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:

 

Rookie Asked on December 6, 2024 in SuiteScript.
Add Comment
1 Answer(s)

ok, I found there is a filter for systemnotes.type is FIELDCHANGE. Looks like that is the ticket.

Rookie Answered on December 6, 2024.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.
  • This site made possible by our sponsors:   Tipalti   Celigo   SuiteMigration   Become a Sponsor