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.
Narrative Insights is Temporarily Unavailable due to an Infrastructure Issue. Learn how This Impacts Your Account and What to Expect While the Feature is Disabled.
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