Custom Segment

The Custom Segments feature lets you create custom classification fields similar to class, department, and location. You can create an unlimited number of custom segments, define possible values for each segment, and add the segments to specific record types. People working in NetSuite can then use the segments to classify records appropriately.

To work with custom segments, you must enable the Custom Segment feature at Setup > Company > Setup Tasks > Enable Features, on the SuiteCloud subtab.

The custom segment record is defined in the customization XSD.

Supported Operations

Only the get operation is supported with the custom segment record.

Field Definitions

The SOAP Schema Browser includes definitions for all body fields and sublist fields available to this record. For details, see the SOAP Schema Browser’s custom segment reference page.

Note:

For information about using the SOAP Schema Browser, see SOAP Schema Browser.

Usage Notes

  • By default, only administrators can create and configure segments and segment values. For information about permitting other roles to complete these tasks, see Permissions for Managing Custom Segments and Values.

  • Only the get operation is supported for custom segments. You can add, update, or delete a custom segment in the UI.

  • You can list existing custom segments using the getCustomizationId operation. For more information, see Example of Dynamic Discovery of Existing Custom Segments and getCustomizationId.

  • You can list existing or available custom segments values using the CustomRecordSearch operations. For details, see Getting the Values of a Custom Segment.

  • When a custom segment is applied to either a custom record type or one of the other record types on the Application & Sourcing subtab of a custom segment, you cannot retrieve information about the field which was created from the custom segment using its script ID and customizationRef. You can only get the field information through its internal ID.

    The Application & Sourcing subtab of a custom segment.

Sample Code

In the following example, a custom segment record is retrieved through SOAP web services.

Java

              Public void getCustomSegment() throws Exception{ 

RecordRef customSegment = new RecordRef(); 
customSegment.setInternalId("1"); 
customSegment.setType(RecordType.customSegment); 

c.getRecord(customSegment); 

} 

            

SOAP Request

               <soapenv:Body> <get xmlns="urn:messages_2019_1.platform.webservices.netsuite.com"> <baseRef internalId="1" type="customSegment" xsi:type="ns7:RecordRef" xmlns:ns7="urn:core_2019_1.platform.webservices.netsuite.com"/> </get> </soapenv:Body> 

            

SOAP Response

               <soapenv:Body> <getResponse xmlns="urn:messages_2019_1.platform.webservices.netsuite.com"> <readResponse> <platformCore:status isSuccess="true" xmlns:platformCore="urn:core_2019_1.platform.webservices.netsuite.com"/> <record internalId="1" xsi:type="setupCustom:CustomSegment" xmlns:setupCustom="urn:customization_2019_1.setup.webservices.netsuite.com"> <setupCustom:label>TestWS</setupCustom:label> <setupCustom:scriptId>cseg_testws</setupCustom:scriptId> <setupCustom:recordScriptId>customrecord_cseg_testws</setupCustom:recordScriptId> <setupCustom:recordType internalId="45" xmlns:platformCore="urn:core_2019_1.platform.webservices.netsuite.com"> <platformCore:name>TestWS</platformCore:name> </setupCustom:recordType> <setupCustom:fieldType>_listRecord</setupCustom:fieldType> <setupCustom:isInactive>false</setupCustom:isInactive> <setupCustom:showInList>false</setupCustom:showInList> <setupCustom:hasGLImpact>false</setupCustom:hasGLImpact> <setupCustom:isMandatory>false</setupCustom:isMandatory> </record> </readResponse> </getResponse> </soapenv:Body> 

            

Related Topics

General Notices