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> Operationsupdate248Sample CodeSOAP Request&lt;mytoken&gt;1Javapublic void ssoLogin() throws Exception {SsoPassport sso = new SsoPassport();sso.setAuthenticationToken("");sso.setPartnerId("1");sessMgr.getPort().ssoLogin(sso);}updateThe update operation is used to update an instance of a record in <strong>NetSuite</strong>. It is similar to theupdateList operation, which allows users to update more than one record at a time.Only the fields that have been populated in each submitted record are updated in the system. Ifa field has NOT been populated, it is not updated in the system and it retains its previous value.If a field is set to an empty string, the previous value of the field is replaced with an emptystring. Therefore, when updating records, it is recommended that you get the desired record,instantiate a new record of the same type, populate only the fields that require an update andthen submit the updated record. This ensures that only the fields requiring an update arewritten on submission.Important: Calculated and hidden fields in records are always updated by the systemunless your service explicitly overrides the system values. For moreinformation, see Hidden Fields in the <strong>NetSuite</strong> Help Center. Also, customfields can only be set to NULL by submitting the field in nullFieldList. Formore information, see CustomFieldList.To ensure that the most recent data for a given record is being modified, when a <strong>Web</strong> servicerequest is received, the values for that record are retrieved at the time of the Update requestrather than with the initial Get of the associated record. The record is then updated by thevalues submitted in the request. It is possible that between the time of the retrieval of the recordfield values and the submission of the updated fields that the record is altered from anothersource (for example from a UI submission). In this case an error message is returned toindicate that the fields have been modified since your service retrieved the record.Although records of a particular type may be used in multiple integration scenarios, eachrecord instance can only have a single external ID value. In order to maintain data integrity,only a single integrated application can set and update external ID values for each record type.<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!