Aaron McCausland
10/08/2025, 1:01 PMCeligo AI
10/08/2025, 1:01 PMAI generated answer (using internal Slack threads):To get the full address of a Location in a Saved Transaction Search where the Location is a field on the Sales Orders in the results, you can use the
search.lookupFields
function in SuiteScript. This function allows you to retrieve specific fields from a record without loading the entire record.
Here is an example of how you can use this function to get the address of a location:
javascript
var locationFields = search.lookupFields({
type: search.Type.LOCATION,
id: createdFrom,
columns: ['address']
});
In this example, createdFrom
should be the ID of the location you want to get the address from. The columns
parameter is an array of the fields you want to retrieve. In this case, you want to retrieve the 'address' field.
The result of this function is an object where the keys are the names of the fields you requested and the values are the values of those fields. In this case, the result would be something like this:
javascript
{
"address": "xxxxxx\r\xxxxxx xxxx Ave\r\nChicago IL xxxxx\r\nUnited States"
}
This is the full address of the location, including line breaks. If you want to display this address in a more human-readable format, you can replace the line breaks with commas or spaces.
Please note that the address is a subrecord, and if you want to get specific parts of the address (like address1, address2, city, state, etc.), you would need to retrieve those fields individually and format them yourself.
******
Disclaimer:
This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes.
******Celigo AI
10/08/2025, 1:02 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.850403
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.833008
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.830139279
Celigo AI
10/08/2025, 1:02 PM