netsuitesuitetalk

sample Soap Message that calls a SavedSearch by the ID


I was wondering if someone has an example using SuiteTalk, i was searching but could not find any examples.


Solution

  • Here's a SOAP request that executes a customer search with the internal ID of the search.

    <soap:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <soap:Header>
            <tokenPassport xmlns="urn:messages_2019_2.platform.webservices.netsuite.com">
                <account xmlns="urn:core_2019_2.platform.webservices.netsuite.com">**********</account>
                <consumerKey xmlns="urn:core_2019_2.platform.webservices.netsuite.com">****************************************************************</consumerKey>
                <token xmlns="urn:core_2019_2.platform.webservices.netsuite.com">****************************************************************</token>
                <nonce xmlns="urn:core_2019_2.platform.webservices.netsuite.com">b591c9bfb56c406c9cf79252783dac7f</nonce>
                <timestamp xmlns="urn:core_2019_2.platform.webservices.netsuite.com">1605312585</timestamp>
                <signature algorithm="HMAC_SHA256" xmlns="urn:core_2019_2.platform.webservices.netsuite.com">********************************************</signature>
            </tokenPassport>
        </soap:Header>
        <soap:Body>
            <search xmlns="urn:messages_2019_2.platform.webservices.netsuite.com">
                <searchRecord savedSearchId="366" xsi:type="q1:CustomerSearchAdvanced" xmlns:q1="urn:relationships_2019_2.lists.webservices.netsuite.com"/>
            </search>
        </soap:Body>
    </soap:Envelope>
    

    It looks like this with C#

    var search = new CustomerSearchAdvanced()
    {
        savedSearchId = "366"
    };
    
    var results = ns.search(search);