Shannon
11/10/2024, 11:00 PMCeligo AI
11/10/2024, 11:01 PMAI generated answer (using internal Slack threads):To make an item search from a sales order using a different field, you can use the SuiteScript API's search functionality. You can create a search with the 'salesorder' type and add filters to specify the field you want to search by. Here's an example of how you can do this:
javascript
var filters = [];
filters.push(search.createFilter({
name: 'yourFieldName',
operator: search.Operator.ANYOF,
values: 'yourValue'
}));
var salesOrderSearch = search.create({
type: search.Type.SALES_ORDER,
filters: filters,
columns: ['item']
});
salesOrderSearch.run().each(function(result) {
// Process each result
return true;
});
In this example, replace 'yourFieldName' with the name of the field you want to search by, and 'yourValue' with the value you're looking for in that field. The 'item' column is included in the results, which will give you the item associated with each sales order that matches your criteria.
Remember to replace the 'yourFieldName' and 'yourValue' with the actual field name and value you want to search by. Also, make sure that the field you're searching by is a searchable field on the sales order record.
******
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
11/10/2024, 11:01 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.83561945
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.833907
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.831400275
Celigo AI
11/10/2024, 11:01 PM