Aaron McCausland
10/08/2025, 1:05 PMAn nlobjSearchColumn contains an invalid column, or is not in proper syntax: address.
Celigo AI
10/08/2025, 1:05 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. However, the address field in NetSuite is a subrecord, which means it's a complex field that contains multiple subfields.
When you use search.lookupFields
with address.address
, it returns the full address as a string, including line breaks (\r\n
). If you want to get the full address without breaking it apart, you can use this string as it is.
Here is an example of how you can use search.lookupFields
to get the address:
javascript
var locationFields = search.lookupFields({
type: search.Type.LOCATION,
id: createdFrom,
columns: ['address.address']
});
In this code, createdFrom
should be the ID of the location you want to get the address for. The locationFields
variable will then contain an object with the full address.
If you want to remove certain parts of the address, you can use JavaScript string manipulation functions. For example, you can use the replace
function to remove line breaks:
javascript
var address = locationFields['address.address'].replace(/\r\n/g, ', ');
This will replace all line breaks in the address with commas, resulting in a single-line address.
Remember that the address format may vary depending on the country and other factors, so you may need to adjust your code accordingly.
******
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:05 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.860534668
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.835266
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.830688477
Celigo AI
10/08/2025, 1:05 PM