HomeTagSubmit NotesAsk AnythingLoginSubscribe Us
1. Feel Free to ask and submit anything on and get satisfactory answer
2. Registration is not compulsory, you can directly login via google or facebook
3. Our Experts are looking for yours ?.

web-service-netsuite: Netsuite Customer Field Update

i have created the saved search for customer data which consist of 4 million data . I need to update the one of the field. Except Csv import which is better way to update the fields, Schedule script or web services. Please share the code

web-service x 19
netsuite x 18
Posted On : 2016-11-09 16:54:37.0
profile Vk - Vk


Each record in NetSuite is uniquely identified by its record type in combination with either a system-generated NetSuite internal ID or an external ID that has been provided at the time of record creation or during an update. Internal and external IDs are NOT unique across different record types. Therefore, both the record type and either the internal ID or the external ID are required to perform an operation on an existing record, and both are returned for each record in all operations on records.

Internal IDs are not reused in the system. Once an internal ID has been assigned, if the associated record is subsequently deleted, the ID is not reused.
The term reference or ref is used to define a reference to any existing record (record type/ID combination) in the system. References are implemented through the RecordRef type, which is defined in the following XSD:

The RecordRef type is described by three attributes -- the internal ID, external ID, and the type:
<complexType name="RecordRef ">
<extension base="platformCore:BaseRef ">
<attribute name="internalId" type="xsd:string"/>
<attribute name="externalId" type="xsd:string"/>
<attribute name="type" type="platformCoreTyp:RecordType"/>

Important: When referencing records, you must provide the internalId or the externalId attribute for all update operations, but not both in the same operation. If both are provided, the internalId is used to locate the record and the externalId is ignored.

Example Java:
public void updateCustomer() throws RemoteException,
ExceededUsageLimitFault, UnexpectedErrorFault, InvalidSessionFault,
ExceededRecordCountFault {
// This operation requires a valid session
Customer customer = new Customer();
// Get nsKey for update
_console.write("\nEnter nsKey for customer record to be updated : ");
// Set name and email
customer.setEntityId("XYZ 2 Inc");
customer.setCompanyName("XYZ 2, Inc.");
// 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.setLabel("Billing Address");
address.setAddr1("4765 Sunset Blvd");
address.setCity("San Mateo");
// Attach the address to the customer
CustomerAddressbookList addressList = new CustomerAddressbookList();
CustomerAddressbook[] addresses = new CustomerAddressbook[1];
addresses[0] = address;
// Invoke add() operation
WriteResponse response = _port.update(customer);
// Process the response
Web Services Operations
SuiteTalk Platform Guide
if (response.getStatus().isIsSuccess()) {"\nThe following customer was updated successfully:"
+ "\nkey="
+ ((RecordRef) response.getBaseRef()).getInternalId()
+ "\nentityId="
+ customer.getEntityId()
+ "\ncompanyName="
+ customer.getCompanyName()
+ "\nemail="
+ customer.getEmail()
+ "\naddressbookList[0].label="
+ customer.getAddressbookList().getAddressbook(0)
} else {

Posted On : 2016-11-12 21:18:11
Satisfied : 0 Yes  0 No
profile Rishi Kumar - Rishi Kumar
Reply This Thread

Post Answer
Please Login First to Post Answer: Login login with facebook -