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.
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