Imran Hasan
03/16/2025, 3:52 PMCeligo AI
03/16/2025, 3:52 PMAI generated answer (using internal Slack threads):To get the custom field data in a saved search from the inventory number that matches with the inventory details batch number, you can use SuiteScript's
N/search
module.
First, you need to load your saved search using the search.load
method. This method requires the ID of the saved search as a parameter.
Here is a sample code snippet:
javascript
let searchObj = search.load({
id: 'your_saved_search_id'
});
After loading the saved search, you can run it and iterate over the results to get the custom field data.
javascript
let resultSet = searchObj.run();
resultSet.each(function(result) {
// Get the value of the custom field
let customFieldValue = result.getValue({
name: 'your_custom_field_id'
});
// Do something with the custom field value
// ...
return true; // Continue to the next result
});
Please replace 'your_saved_search_id'
and 'your_custom_field_id'
with your actual saved search ID and custom field ID.
Remember, this approach assumes that your saved search is already set up to return the inventory numbers that match with the inventory details batch number. If not, you may need to adjust the filters and columns of your saved search 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
03/16/2025, 3:53 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.822391808
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.818802238
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.817909241
Celigo AI
03/16/2025, 3:53 PM