This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.

Working with Update in NetSuite



Overview

The following operations allow you to work with "update". Click an operation name to see details on how to use it.

For a sample proxy service that illustrates how to work with "update", see Sample configuration.

OperationDescription

updateList

Updates a list.

Operation details

This section provides details on the operation.

 Updating a list

The updateList operation is used to update one or more instances of a record type in NetSuite. If there are multiple records, they can be either of the same record type or of different record types. For example, it's possible to update a customer and a contact within a single request using this operation.

Only the fields that have been populated in each submitted record are updated in the system. If a 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 empty string.

Although records of a particular type may be used in multiple integration scenarios, each record 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. External ID values for all records of a particular type must come from the same external application.

Calculated and hidden fields in records are always updated by the system unless your service explicitly overrides the system values. For more information, refer to Hidden Fields.

updateList
<netsuite.updateList>
	<records>{$ctx:records}</records>
</netsuite.updateList>
Properties
  • records: One or more records that need to be updated.
Sample request

Following is a sample SOAP request that can be handled by the updateList operation.

Sample Request for updateList
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="wso2.connector.netsuite.updatelist">
  <soapenv:Header></soapenv:Header>
  <soapenv:Body>
  	<urn:apiUrl>https://webservices.na1.netsuite.com/services/NetSuitePort_2014_1</urn:apiUrl>
    <urn:warningAsError></urn:warningAsError>
    <urn:disableMandatoryCustomFieldValidation></urn:disableMandatoryCustomFieldValidation>
    <urn:disableSystemNotesForCustomFields></urn:disableSystemNotesForCustomFields>
    <urn:ignoreReadOnlyFields></urn:ignoreReadOnlyFields>
    <urn:partnerId></urn:partnerId>
    <urn:applicationId></urn:applicationId>
    <urn:email>user@gmail.com</urn:email>
    <urn:password>123</urn:password>
    <urn:account>TVTDRV1193710</urn:account>
    <urn:roleInternalId></urn:roleInternalId>
    <urn:roleExternalId></urn:roleExternalId>
    <urn:roleType></urn:roleType>
    <urn:roleName></urn:roleName>
    <urn:records>
     <platformMsgs:record internalId="3651" xsi:type="listRel:Customer" 
         xmlns:listRel="urn:relationships_2014_1.lists.webservices.netsuite.com" 
         xmlns:platformMsgs="urn:messages_2014_1.platform.webservices.netsuite.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <listRel:companyName>Wos2, Inc</listRel:companyName>
            <listRel:lastName>John</listRel:lastName>
         </platformMsgs:record>
    </urn:records>
  </soapenv:Body>
</soapenv:Envelope> 

 

Sample configuration

Following is a sample proxy service that illustrates how to connect to NetSuite with the init operation and use the updateList operation. The sample request for this proxy can be found in updateList sample request. You can use this sample as a template for using other operations in this category.

Sample Proxy
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
       name="netsuite_updateList"
       transports="https,http"
       statistics="disable"
       trace="disable"
       startOnLoad="true">
   <target>
      <inSequence>
         <property xmlns:ns="wso2.connector.netsuite.updatelist"
                   name="apiUrl"
                   expression="//ns:apiUrl/text()"/>
         <property xmlns:ns="wso2.connector.netsuite.updatelist"
                   name="warningAsError"
                   expression="//ns:warningAsError/text()"/>
         <property xmlns:ns="wso2.connector.netsuite.updatelist"
                   name="disableMandatoryCustomFieldValidation"
                   expression="//ns:disableMandatoryCustomFieldValidation/text()"/>
         <property xmlns:ns="wso2.connector.netsuite.updatelist"
                   name="disableSystemNotesForCustomFields"
                   expression="//ns:disableSystemNotesForCustomFields/text()"/>
         <property xmlns:ns="wso2.connector.netsuite.updatelist"
                   name="ignoreReadOnlyFields"
                   expression="//ns:ignoreReadOnlyFields/text()"/>
         <property xmlns:ns="wso2.connector.netsuite.updatelist"
                   name="partnerId"
                   expression="//ns:partnerId/text()"/>
         <property xmlns:ns="wso2.connector.netsuite.updatelist"
                   name="applicationId"
                   expression="//ns:applicationId/text()"/>
         <property xmlns:ns="wso2.connector.netsuite.updatelist"
                   name="email"
                   expression="//ns:email/text()"/>
         <property xmlns:ns="wso2.connector.netsuite.updatelist"
                   name="password"
                   expression="//ns:password/text()"/>
         <property xmlns:ns="wso2.connector.netsuite.updatelist"
                   name="account"
                   expression="//ns:account/text()"/>
         <property xmlns:ns="wso2.connector.netsuite.updatelist"
                   name="roleInternalId"
                   expression="//ns:roleInternalId/text()"/>
         <property xmlns:ns="wso2.connector.netsuite.updatelist"
                   name="roleExternalId"
                   expression="//ns:roleExternalId/text()"/>
         <property xmlns:ns="wso2.connector.netsuite.updatelist"
                   name="roleType"
                   expression="//ns:roleType/text()"/>
         <property xmlns:ns="wso2.connector.netsuite.updatelist"
                   name="roleName"
                   expression="//ns:roleName/text()"/>
         <property xmlns:ns="wso2.connector.netsuite.updatelist"
                   name="records"
                   expression="//ns:records/*"/>
         <netsuite.init>
            <apiUrl>{$ctx:apiUrl}</apiUrl>
            <warningAsError>{$ctx:warningAsError}</warningAsError>
            <disableSystemNotesForCustomFields>{$ctx:disableSystemNotesForCustomFields}</disableSystemNotesForCustomFields>
            <ignoreReadOnlyFields>{$ctx:ignoreReadOnlyFields}</ignoreReadOnlyFields>
            <disableMandatoryCustomFieldValidation>
            {$ctx:disableMandatoryCustomFieldValidation}
            </disableMandatoryCustomFieldValidation>			
            <roleInternalId>{$ctx:roleInternalId}</roleInternalId>
            <partnerId>{$ctx:partnerId}</partnerId>
            <applicationId>{$ctx:applicationId}</applicationId>
            <roleName>{$ctx:roleName}</roleName>
            <password>{$ctx:password}</password>
            <roleExternalId>{$ctx:roleExternalId}</roleExternalId>
            <email>{$ctx:email}</email>
            <account>{$ctx:account}</account>
            <roleType>{$ctx:roleType}</roleType>
         </netsuite.init>
         <netsuite.updateList>
            <records>{$ctx:records}</records>
         </netsuite.updateList>
         <respond/>
      </inSequence>
      <outSequence>
        <send/>
      </outSequence>
   </target>
   <description/>
</proxy>