Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
Searching for a transaction by number
Hi
I'm searching for transactions by number in a script. Usually I do something like this:
var filters=[]; filters[0]=new nlobjSearchFilter("number",null,"equalto",ordernumber); filters[1]=new nlobjSearchFilter("mainline",null,"is","T"); var results=nlapiSearchRecord("purchaseorder",null,filters); where, in this example, I'm searching for a purchase order whose number is in "ordernumber".
I've just noticed, however, that this fails if the number is not numeric - for example if a transaction prefix is defined or if the number has been overridden and contains non-numeric characters.
I've tried different search operators with no joy.
Does anyone know how I can search for an arbitary transaction number, eg. - from my sample data that's failing - PO608UFW2A - ?
0