Wednesday, October 17, 2018

How to get the Subsidiary internal id using subsidiary name using Web Services?

Question:  How to get the Subsidiary internal id using subsidiary name using Web Services?

Answer:

Do a SubsidiarySearch and please refer to the sample SOAP Request below:

  <soapenv:Body>
     <platformMsgs:search
         xmlns:platformCore="urn:core_2011_1.platform.webservices.netsuite.com"
         xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
         xmlns:xsd="http://www.w3.org/2001/XMLSchema"
         xmlns:s0="urn:accounting_2011_1.lists.webservices.netsuite.com"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns:platformCommon="urn:common_2011_1.platform.webservices.netsuite.com"
         xmlns:platformMsgs="urn:messages_2011_1.platform.webservices.netsuite.com">
        <platformMsgs:searchRecord xsi:type="s0:SubsidiarySearch">
           <s0:basic>
              <platformCommon:name operator="is">
                 <platformCore:searchValue>OneWorld Test Account (US Version) - TSTDRV401309-PARENT COMPANY : Australia</platformCore:searchValue>
              </platformCommon:name>
           </s0:basic>
        </platformMsgs:searchRecord>
     </platformMsgs:search>
  </soapenv:Body>

The above SOAP request would return the internal id and informations associated with the Subsidiary record.

No comments:

Post a Comment