is it possible to search for records with a custom...
# suitescript
n
is it possible to search for records with a custom list/record field being empty? I tried search.Operator.ISEMPTY and records with a record assigned still come back. Looking at the docs, it says List/Record only allows ANYOF and NONEOF. But How would I structure the ANYOF?
I tried:
Copy code
{
                name: 'custbody_fye_booking_journal_entry', 
                operator: search.Operator.ANYOF,
                values: [null],
}
and:
Copy code
{
                name: 'custbody_fye_booking_journal_entry', 
                operator: search.Operator.ISEMPTY,
}
and:
Copy code
{
                name: 'custbody_fye_booking_journal_entry', 
                operator: search.Operator.ANYOF,
                values: [],
}
m
I think it’s this:
Copy code
{
    name: 'custbody_fye_booking_journal_entry',
        operator: search.Operator.ANYOF,
    values: '@NONE@',
}
👍 1
n
That did the trick, thanks
Where did you find that value if you don't mind me asking? I searched the suitescript help and couldn't find any reference of it
m
I tried to find it in the help just now and couldn’t find it. It’s just something that I picked up somewhere previously.
n
Alright, at least I'm not crazy. Thanks again!
m
Also, with this Chrome extension, you can build your search in the UI and see the SuiteScript needed to recreate that search in code. It’s very helpful. https://chrome.google.com/webstore/detail/netsuite-search-export/gglbgdfbkaelbjpjkiepdmfaihdokglp?hl=en-US
n
Awesome, thanks again