Identifying the Correct Script ID for a Custom Segment

When using SOAP web services to set a value for a custom segment, you use the CustomFieldRef complex type. As part of this approach, you use the CustomFieldRef’s scriptId field to identify the exact segment for which you want to set a value.

As of 2019.1, any new custom segments that you create automatically use the unified ID, and the Use as Field ID box is not visible.

If you are editing a custom segment definition that was created before 2019.1, the Use as Field ID box is available, if the custom segment uses the legacy script ID.

By using unified script IDs, you can use a single ID in your SOAP requests to refer to a custom field related to a particular custom segment on any record type the segment is applied to. The script ID in this case refers to a custom field, and not to a particular record type. With the unified script ID, you do not need to distinguish between script ID values based on the record type you are working with. For more information, see Creating a Custom Segment.

Identifying Custom Segments When Using the Unified Script ID

The unified script ID refers to a custom field related to a particular custom segment on any record type the segment is applied to.

To identify the custom segment, you must use the ID as it appears on the custom segment record.

The unified script ID of a custom segment.

Identifying Custom Segments When Using the Legacy Script ID

Important:

As of 2019.1, any new custom segments that you create automatically use the unified ID. The following section only applies if you are working with a custom segment definition that was created before 2019.1.

If you do not use the unified script ID for a custom segment, you must use the ID as it appears on an instance of the record type when you set a value for the scriptID field. Do not use the ID that appears on the custom segment record. On the custom segment record, the ID has a value that begins with the prefix cseg. On the record instance where the segment appears as a field, the ID has an additional prefix that corresponds with the category of the record type. You must use this longer ID that is specific to the record type category.

For example, on the custom segment record, the ID might have a value like cseg_profitcenter. If the segment has been applied to the inventory item record type, the segment ID on the inventory item record is custitem_cseg_profitcenter. If the same segment has been applied to a customer record, the ID on the customer record is custentity_cseg_profitcenter. Use the ID as it appears on the specific record type that you are working with.

The ID of a custom segment record.

Callout

Description

Callout number 1

Do not use this ID.

Callout number 2

Use this type of ID.

To identify the ID for a segment:

  1. If you do not have the Show Internal Ids preference set to true, enable it by completing the following steps:

    1. In NetSuite, point to the Home icon, and click Set Preferences.

    2. On the Set Preferences page, check the Show Internal IDs box.

    3. Click Save.

  2. Go to an instance of the appropriate record type.

  3. Locate the segment field. On standard forms, custom segments are listed on the Custom subtab.

  4. Locate the appropriate segment field. Click its label to display a popup box that includes the field’s ID.

Related Topics

Custom Segment Types
Custom Segments
CustomFieldLists for Setting Custom Segment Values
Custom Segment Types
Identifying a Custom Segment Value
Example of Setting a List/Record Segment Value
Example of Setting Values for Multiple Segments

General Notices