ANS-0150 · SAVED SEARCHES & FORMULAS

How to Reference Customer Internal ID in NetSuite Formulas?

Correctly reference a customer or company's internal ID in NetSuite formulas and custom fields.

Short answer

To reference the internal ID of a customer or company on an opportunity (or other records) within a NetSuite formula, use the field ID {id}. While {entity} provides the customer's name, {id} accurately retrieves the unique internal identifier for the record, ensuring precise data integration.

Scenario

Users often need to include the internal ID of a customer or company record in custom fields or formulas on NetSuite forms, such as opportunities. A common challenge arises when attempting to retrieve this ID, as the {entity} field, which might seem intuitive, returns the customer's name instead of their unique internal identifier.

Solution

When creating a formula for a custom field that requires the internal ID of an associated customer or company on a record like an opportunity, it is important to use the correct field identifier. Although {entity} is often displayed in quick help for the company field, this field returns the customer or company's name, not its internal ID. The accurate field name to use for retrieving the customer or company's internal ID in a formula is:

{id}

This principle also applies when referencing the internal ID in NetSuite scripting contexts.

Expert NetSuite Support

Need help with this NetSuite issue?

Saved Searches & Formulas consulting and configuration support

Talk to a consultant