Context Filtering for Suitescript
Hello All,
I am trying to help my developer on including more filters for a particular script. Is this the correct format when combing multiple criteria filters? The filters in question are from the system notes fields when updates are made to items.
/**
* find and return an array of internal ids of Items that is created on or after given date
* @param name
* @return {*[]} internal ids
*/
const getItem = (date) => {
const items = [];
const itemSearchObj = search.create({
type: search.Type.ITEM,
filters: [
//["type",search.Operator.ANYOF,"InvtPart","NonInvtPart","Assembly"],
//"AND",
//["systemnotes.field",search.Operator.ANYOF,"Display Name","Sales Description"],
//"AND",
["systemnotes.context",search.Operator.ANYOF,"UI"],
"AND",
["systemnotes.date",search.Operator.ONORAFTER, date],
"AND",
["pricing.pricelevel",search.Operator.ANYOF,HZ1, HZ2, HZ3, HZ4, BasePrice]
],
columns:
ok, I found there is a filter for systemnotes.type is FIELDCHANGE. Looks like that is the ticket.



