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.
Looking for Clarification
Recently I had an un-expected behaviour happen. I had created a custom module using the define statement which was then used in a client side script. Below is simplified version of the custom module.
define([], function() { validateDate=function(dt){ return dt.getMonth()==0;//Just for illustration purposes we're in January }; return { isJanuary: function(dt){ return this.validateDate(dt); } }; });The validateDate function was defined incorrectly. it should have been
function validateDate
what really surprised me was that validateDate = function() .. actually overwrote or broke a NetSuite global client side function of the same name. So while I won't make this mistake again, how did expression validateDate = function(dt)... in my custom module cause this?
0