Luis
09/28/2024, 8:56 PMCeligo AI
09/28/2024, 8:56 PMAI generated answer (using internal Slack threads):Based on the conversations, you can create a saved search to find an address by the addressbook internal id. Here is an example of how you can do this using SuiteScript:
code
var shipaddressSearch = search.create({
type: recordtype,
filters: [['internalid', 'is', recordid]],
columns: [
search.createColumn({
name: "internalid",
join: "Address",
label: "Internal ID"
}),
search.createColumn({
name: "addressinternalid"
})
]
})
var shipipingAddressResults = shipaddressSearch.run().getRange({
start: 0,
end: 1000
})
debugger;
shipipingAddressResults.forEach(function (shipaddress) {
console.log("EXTERNAL ID", shipaddress.getValue("addressinternalid"));
if (shipaddress.getValue("addressinternalid") == warehouseLocation) {
warehouseLocation = shipaddress.getValue({ name: 'internalid', join: 'Address' });
}
})
In this code, a search is created with the type of record and a filter for the internal id. The columns returned are the internal id and the address internal id. The search is then run and the results are looped through to find the address with the matching internal id.
******
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
09/28/2024, 8:56 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.840153933
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.832939923
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.828293204
Celigo AI
09/28/2024, 8:56 PM