ANS-0647 · WEB SERVICES & INTEGRATIONS

How to Manipulate NetSuite Custom Lists Using SOAP Web Services

This guide demonstrates how to perform an update operation on a NetSuite Custom List using SOAP web services, including essential header configurations.

Short answer

Yes, NetSuite Custom Lists can be manipulated using SOAP web services. This involves constructing a SOAP envelope with appropriate headers for preferences and authentication, and a body containing the 'update' operation for the 'CustomList' record type. Ensure to specify the internal ID of the list and its values for modification. Note that SOAP web services are being deprecated in favor of SuiteTalk REST.

Scenario

A NetSuite administrator or developer needs to programmatically update or add entries to an existing Custom List within NetSuite. Manual updates are inefficient for large-scale or recurring changes. The objective is to achieve this manipulation using NetSuite's web services.

Solution

NetSuite Custom Lists can be manipulated through SOAP web services. The following example illustrates an update operation for a Custom List. It is important to note that NetSuite's SOAP web services platform is scheduled for gradual removal, with full deprecation expected by the 2028.2 release. For new integrations, SuiteTalk REST web services are the recommended replacement. The provided example uses an outdated authentication method. NetSuite strongly recommends using Token-Based Authentication (TBA) for SOAP web services. For current authentication practices, refer to NetSuite's official SuiteTalk Web Services documentation. Below is an example of a SOAP request body for updating a Custom List, with updated WSDL namespaces:

xml
<soapenv:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
        <soapenv:Header>
            <ns1:Preferences soapenv:mustUnderstand="0"
soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next"
xmlns:ns1="urn:messages.platform.webservices.netsuite.com">
                <ns2:warningAsError
xmlns:ns2="urn:messages_2025_2_0.platform.webservices.netsuite.com">false</ns2:warningAsError>
                <ns3:disableMandatoryCustomFieldValidation
xmlns:ns3="urn:messages_2025_2_0.platform.webservices.netsuite.com">true</ns3:disableMandatoryCustomFieldValidation>
                <ns4:ignoreReadOnlyFields
xmlns:ns4="urn:messages_2025_2_0.platform.webservices.netsuite.com">true</ns4:ignoreReadOnlyFields>
            </ns1:Preferences>
            <ns5:searchPreferences soapenv:mustUnderstand="0"
soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next"
xmlns:ns5="urn:messages.platform.webservices.netsuite.com">
                <ns6:bodyFieldsOnly
xmlns:ns6="urn:messages_2025_2_0.platform.webservices.netsuite.com">false</ns6:bodyFieldsOnly>
                <ns7:pageSize
xmlns:ns7="urn:messages_2025_2_0.platform.webservices.netsuite.com">500</ns7:pageSize>
            </ns5:searchPreferences>
            <!-- The original example used an outdated passport-based authentication method. -->
            <!-- NetSuite strongly recommends using Token-Based Authentication (TBA) for SOAP web services. -->
            <!-- For current authentication practices, refer to NetSuite's official SuiteTalk Web Services documentation. -->
        </soapenv:Header>
        <soapenv:Body>
            <update
xmlns="urn:messages_2025_2_0.platform.webservices.netsuite.com">
                <record xsi:type="ns13:CustomList" internalId="2"
xmlns:ns13="urn:customization_2025_2_0.setup.webservices.netsuite.com">
                    <ns13:name xsi:type="xsd:string">Advertising
Preferences</ns13:name>
                    <ns13:isOrdered xsi:type="xsd:boolean">false</ns13:isOrdered>
                    <ns13:isMatrixOption
xsi:type="xsd:boolean">false</ns13:isMatrixOption>
                    <ns13:scriptId
xsi:type="xsd:string">customlist2</ns13:scriptId>
                    <ns13:convertToCustomRecord
xsi:type="xsd:boolean">false</ns13:convertToCustomRecord>
                    <ns13:isInactive
xsi:type="xsd:boolean">false</ns13:isInactive>
                    <ns13:customValueList
xsi:type="ns13:CustomListCustomValueList" replaceAll="true">
                        <ns13:customValue xsi:type="ns13:CustomListCustomValue">
                            <ns13:value xsi:type="xsd:string">E-mail</ns13:value>
                            <ns13:isInactive
xsi:type="xsd:boolean">false</ns13:isInactive>
                            <ns13:valueId xsi:type="xsd:long">2</ns13:valueId>
                        </ns13:customValue>
                        <ns13:customValue xsi:type="ns13:CustomListCustomValue">
                            <ns13:value xsi:type="xsd:string">Mail</ns13:value>
                            <ns13:isInactive
xsi:type="xsd:boolean">false</ns13:isInactive>
                            <ns13:valueId xsi:type="xsd:long">3</ns13:valueId>
                        </ns13:customValue>
                        <ns13:customValue xsi:type="ns13:CustomListCustomValue">
                            <ns13:value xsi:type="xsd:string">No
advertisements</ns13:value>
                            <ns13:isInactive
xsi:type="xsd:boolean">false</ns13:isInactive>
                        </ns13:customValue>
                    </ns13:customValueList>
                </record>
            </update>

Expert NetSuite Support

Need help with this NetSuite issue?

Web Services & Integrations consulting and configuration support

Talk to a consultant