Exploring search.lookupFields in SuiteScript: What You Can and Cannot Fetch

In SuiteScript, the search.lookupFields method is a powerful tool for retrieving specific field values from a record without performing a full search. This method is particularly useful for quickly accessing data with minimal overhead. However, it’s important to understand its capabilities and limitations. This article explores what data you can fetch using search.lookupFields and what you cannot. search.lookupFields is a… Continue reading Exploring search.lookupFields in SuiteScript: What You Can and Cannot Fetch

When to Use lookupFields vs. record.load

search.lookupFields (Preferred for Performance) Pros: ✅ Faster execution – Retrieves only the required fields instead of loading the entire record. ✅ Lower governance cost – Uses fewer script governance units (2 units vs. 10+ for record.load). ✅ Ideal for simple lookups – Useful when fetching a few fields (e.g., getting a status, subsidiary, or custom… Continue reading When to Use lookupFields vs. record.load

Entity name not fully fetched using lookupFields

The “entityid” field of a customer record displays customer id and name. When fetching the “entityid” field value from a record using search.lookupFields, only the customer id is returned without the customer’s name. search.lookupFields is optimized for quick lookup of field values and generally returns a simplified version of the data. “entityid” concatenates multiple pieces… Continue reading Entity name not fully fetched using lookupFields