SOAP Operation – getCustomizationId

When integrating with NetSuite through SOAP web services, in many cases, you will want to know which custom objects exist in an account. You may also want to obtain metadata for these custom objects so that your application can handle any business logic that is specific to the account.

To learn which custom objects exist in an account, use the getCustomizationId operation to retrieve the internalIds, externalIds, and/or scriptIds of all custom objects of a specified type. These types, enumerated in CustomizationType, include the following:

  • crmCustomField
  • customList
  • customRecordType
  • customRecordCustomField
  • customSegment
  • entityCustomField
  • itemCustomField
  • itemOptionCustomField
  • otherCustomField
  • transactionBodyCustomField
  • transactionColumnCustomField

After the IDs are returned, you can then pass the ID value(s) to either the get or getList operation to obtain metadata for specific custom objects

Request

<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/'
    xmlns:platformCore='urn:core_2021_2.platform.webservices.netsuite.com'
    xmlns:listRel='urn:relationships_2021_2.lists.webservices.netsuite.com'
    xmlns:listAcct='urn:accounting_2021_2.lists.webservices.netsuite.com'
    xmlns:platformMsgs='urn:messages_2021_2.platform.webservices.netsuite.com'>
    <soapenv:Header>
        <tokenPassport xsi:type='platformCore:TokenPassport'>
            <account xsi:type='xsd:string'>{{accountId}}</account>
            <consumerKey xsi:type='xsd:string'>{{consumerKey}}</consumerKey>
            <token xsi:type='xsd:string'>{{tokenId}}</token>
            <nonce xsi:type='xsd:string'>{{nonce}}</nonce>
            <timestamp xsi:type='xsd:long'>{{timestamp}}</timestamp>
            <signature algorithm='HMAC_SHA256' xsi:type='platformCore:TokenPassportSignature'>{{signature}}</signature>
        </tokenPassport>
    </soapenv:Header>
       <soapenv:Body>
        <getCustomizationId xsi:type='platformMsgs:GetCustomizationIdRequest'>
            <customizationType getCustomizationType='customList' xsi:type='platformCore:CustomizationType'/>
            <includeInactives xsi:type='xsd:boolean'>true</includeInactives>
        </getCustomizationId>
    </soapenv:Body>
</soapenv:Envelope>

Response

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope
    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soapenv:Header>
        <platformMsgs:documentInfo
            xmlns:platformMsgs="urn:messages_2021_2.platform.webservices.netsuite.com">
            <platformMsgs:nsId>WEBSERVICES_TSTDRV2782962_08062023831614857389097755_4d055c9</platformMsgs:nsId>
        </platformMsgs:documentInfo>
    </soapenv:Header>
    <soapenv:Body>
        <getCustomizationIdResponse
            xmlns="">
            <platformCore:getCustomizationIdResult
                xmlns:platformCore="urn:core_2021_2.platform.webservices.netsuite.com">
                <platformCore:status isSuccess="true"/>
                <platformCore:totalRecords>11</platformCore:totalRecords>
                <platformCore:customizationRefList>
                    <platformCore:customizationRef scriptId="customlist_avnskb_aggregationtype" internalId="29" type="customList">
                        <platformCore:name>AVNS Kanban Aggregation Type</platformCore:name>
                    </platformCore:customizationRef>
                    <platformCore:customizationRef scriptId="customlist_avnskb_coidentifier" internalId="28" type="customList">
                        <platformCore:name>AVNS Kanban Color Identifier</platformCore:name>
                    </platformCore:customizationRef>
                    <platformCore:customizationRef scriptId="customlist_avnskb_imagetype" internalId="26" type="customList">
                        <platformCore:name>AVNS Kanban Image Type</platformCore:name>
                    </platformCore:customizationRef>
                    <platformCore:customizationRef scriptId="customlist_avnskb_actiontype" internalId="30" type="customList">
                        <platformCore:name>AVNS Kanban action type</platformCore:name>
                    </platformCore:customizationRef>
                    <platformCore:customizationRef scriptId="customlist_avnskb_horizontal_align" internalId="27" type="customList">
                        <platformCore:name>AVNS Kanban horizontal align</platformCore:name>
                    </platformCore:customizationRef>
                    <platformCore:customizationRef scriptId="customlist_avnskb_operator" internalId="25" type="customList">
                        <platformCore:name>AVNS Kanban operator</platformCore:name>
                    </platformCore:customizationRef>
                    <platformCore:customizationRef scriptId="customlist_avnskb_vertical_alignment" internalId="24" type="customList">
                        <platformCore:name>AVNS Kanban vertical alignment</platformCore:name>
                    </platformCore:customizationRef>
                    <platformCore:customizationRef scriptId="customlist_item360_alert_category" internalId="34" type="customList">
                        <platformCore:name>Alert Category</platformCore:name>
                    </platformCore:customizationRef>
                    <platformCore:customizationRef scriptId="customlist_jj_test_product_category" internalId="131" type="customList">
                        <platformCore:name>JJ Test Product Category</platformCore:name>
                    </platformCore:customizationRef>
                    <platformCore:customizationRef scriptId="customlist_item360_priority" internalId="35" type="customList">
                        <platformCore:name>Priority</platformCore:name>
                    </platformCore:customizationRef>
                    <platformCore:customizationRef scriptId="customlist_item360_userorrole" internalId="36" type="customList">
                        <platformCore:name>User/Role</platformCore:name>
                    </platformCore:customizationRef>
                </platformCore:customizationRefList>
            </platformCore:getCustomizationIdResult>
        </getCustomizationIdResponse>
    </soapenv:Body>
</soapenv:Envelope>

Leave a comment

Your email address will not be published. Required fields are marked *