Example of Getting a Custom Segment Value by Using Type Internal ID

This example shows how to get an existing custom segment value.

The way you identify a custom segment value can vary depending on the endpoint and operation you are using. This example uses the 2017.1 endpoint. It demonstrates how to identify the segment by using the internal ID of the custom record type that represents the segment. This method is available with all endpoints. The value is identified by external ID.

For details on identifying custom segments and their values, see Identifying Custom Segments and Values Identifying Custom Segments.

C#

          private void getSegmentValue()
{

 CustomRecordRef myNewSegmentValue = new CustomRecordRef();
 myNewSegmentValue.typeId = "39";
 myNewSegmentValue.externalId = "Apparel";

 _service.get(myNewSegmentValue);
} 

        

SOAP Request

          <soap:Body> <get xmlns="urn:messages_2017_1.platform.webservices.netsuite.com"> baseRef typeId="39" externalId="Apparel" xsi:type="q1:CustomRecordRef" xmlns:q1="urn:core_2017_1.platform.webservices.netsuite.com"/> </get>
</soap:Body> 

        

SOAP Response

          <soapenv:Body> <getResponse xmlns="urn:messages_2017_1.platform.webservices.netsuite.com"> <readResponse> <platformCore:status isSuccess="true" xmlns:platformCore="urn:core_2017_1.platform.webservices.netsuite.com"/> <record xsi:type="setupCustom:CustomRecord" externalId="Apparel" internalId="8" xmlns:setupCustom="urn:customization_2017_1.setup.webservices.netsuite.com"> <setupCustom:isInactive>false</setupCustom:isInactive> <setupCustom:name>Apparel</setupCustom:name> <setupCustom:owner internalId="-4" xmlns:platformCore="urn:core_2017_1.platform.webservices.netsuite.com"> <platformCore:name>-System-</platformCore:name> </setupCustom:owner> <setupCustom:recType internalId="39" xmlns:platformCore="urn:core_2017_1.platform.webservices.netsuite.com"> <platformCore:name>Profit Center</platformCore:name> </setupCustom:recType> </record> </readResponse> </getResponse>
</soapenv:Body> 

        

Related Topics

General Notices