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.
Now is the time to ask your NetSuite-savvy friends and colleagues to join the NetSuite Support Community! Refer now! Click here to watch and learn more!
Search filter year ONLY - nastyness inside!
I have a need to add a search filter that will filter a date field to be a specific year. For example I want to find all records that have a date value in 1988 (good year!)
After receiving several "UNEXPECTED_ERROR"s trying to pass a year string with an 'on' operator I finally came up with this:
var yearLock = '1998'; filters.push( new nlobjSearchFilter(FEESCHEDLN_FLD.EFFECTIVE_DATE, null, 'within', '1/1/' + yearLock, '12/31/' + yearLock));
Now that works, but it kinda bums me out, I feel like maybe there is a cleaner way? Anyone know how to filter to a specific year?
Steve Klett | Senior Developer
NetValue Technology
0