Nour Khaled
04/08/2025, 11:20 AMCeligo AI
04/08/2025, 11:20 AMAI generated answer (using internal Slack threads):Based on the conversations, to turn the provided JSON into a filter in a search function in SuiteScript 2.0, you would use the
search.createFilter()
method. Here is an example of how you can do it:
javascript
var myFilter = search.createFilter({
name: 'inventorynumber',
join: 'itemnumber',
operator: <http://search.Operator.IS|search.Operator.IS>,
values: ['730199']
});
Then, you can use this filter in a search:
javascript
var mySearch = search.create({
type: 'customrecord_my_custom_record',
filters: [myFilter],
columns: ['internalid', 'name']
});
Please note that the join
parameter in the search.createFilter()
method is used to specify a join (relationship) to another record type. In your case, it's 'itemnumber'. The operator
parameter is used to specify the search operator. In your case, it's 'is', which means the search will return records where the 'inventorynumber' is '730199'.
******
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
04/08/2025, 11:21 AMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.863615274
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.860857904
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.859027743
Celigo AI
04/08/2025, 11:21 AM