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!
Stay in the Know
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
Completed Script to Check Date is in an Open Period
Hi,
2009.2 has made accounting periods scriptable.
I've just completed a script to check whether a date is in an open period so thought I would share it. The function takes a date object and returns true if there is an open period that contains that date (that is not a quarter or year). A null date returns true.
I am using this to make sure the sales reps can't put in sales orders with a start date in a closed period.
Note, you need to use nlapiStringToDate on a date field value in Netsuite to make it a date object.
0