Using SuiteScript, I need to retrieve an array of Item Fulfillment records that shipped on any given day
After looking at the Records Browser, this would seem to be the most logical filter expression to use (along with the nlapiSearchRecord API)
var filters = [ ['status', 'anyof', 'ItemShip:C'], 'AND', ['shipdate', 'on', 'today'] ];
However I consistently get 0 results, despite verifying that whatever date range I attempt, I indeed know that there were fulfillments shipped during that range (I checked the UI).I've tried both the 'shipdate' and 'actualshipdate' search filters, with no luck. I get a search result with no errors, it just has 0 results.My next thought was an attempt at checking the System Notes fields. I attempted this as my filter expression.var filters = [ ['systemnotes.oldvalue', 'contains', 'Packed'], 'AND', ['systemnotes.newvalue', 'contains', 'Shipped'], 'AND', ['systemnotes.date', 'contains', today] ];
Where today is generated via:var today = nlapiDateToString(new Date(),'date');
This time, I get an UNEXPECTED_ERROR with no additional details. I'm running this in the Script Debugger, and it is at the point of the nlapiSearchRecord() call that the UNEXPECTED_ERROR is thrown.I'm really hoping I'm missing something obvious and am making this out to be something more difficult than it needs to be.Any suggestions?