10.07.2015 Views

SuiteTalk (Web Services) Platform Guide - NetSuite

SuiteTalk (Web Services) Platform Guide - NetSuite

SuiteTalk (Web Services) Platform Guide - NetSuite

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Web</strong> <strong>Services</strong> Operationsupdate250Shutter Fly CorporationSOAP ResponseC#private void updateCustomer(){// This operation requires a valid sessionthis.login( true );Customer customer = new Customer();// Get nsKey for update_out.write( "\nEnter nsKey for customer record to be updated : " );customer.internalId = _out.readLn().ToUpper();// Set name and emailcustomer.entityId = "XYZ 2 Inc";customer.companyName = "XYZ 2, Inc.";customer.email = "bsanders@xyz.com";// Populate the address. Updating a list through WS results in the// entire contents of the previous list being replaced by the new// list.CustomerAddressbook address = new CustomerAddressbook();address.defaultBilling = true;address.defaultBillingSpecified = true;address.defaultBilling = false;address.defaultBillingSpecified = true;address.label = "Billing Address";address.addr1 = "4765 Sunset Blvd";address.city = "San Mateo";address.state = "CA";address.country = Country._unitedStates;// Attach the address to the customerCustomerAddressbookList addressList = new CustomerAddressbookList();CustomerAddressbook[] addresses = new CustomerAddressbook[1];addresses[0] = address;addressList.addressbook = addresses;customer.addressbookList = addressList;// Invoke add() operation<strong>SuiteTalk</strong> <strong>Platform</strong> <strong>Guide</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!