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.
Keep an eye out for upcoming NetSuite events, including meetups, workshops, and webinars. These sessions are a great way to connect with peers, learn from experts, and stay current on the latest NetSuite updates and best practices. Registration links are provided in each event.
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