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