SS 2.0 > Client Script > search.lookupField > How to Retrieve a Joined Column

User wants to use search.lookupField to lookup joined fields on a record.

Solution
  1. Make sure the field to be searched is a joined field
  2. Please refer to the The SuiteScript Records Browser – ID 74610
  3. *The reference would be found under Search Joins table
  4. Edit the Sample Code Below
var fieldLookUp = search.lookupFields({
	type: search.Type.SALES_ORDER, //The intended record type
	id: '1865', //Record ID
	columns: ['customer.firstname'] //Desired joined field referenced_record.desired_field
});

var firstName = fieldLookUp['customer.firstname'];

Copy
  1. *The Sample Code above retrieves the First Name of the Customer

Leave a comment

Your email address will not be published. Required fields are marked *