How to convert the date into predefined format using utility module

 let currentDate = new Date();                 let previousDate = getDate(-1);                 let nextDate = getDate(1);                 let dates = [                     JJ_CM_NS_Utility.dateLogic.formatDate(previousDate, ‘YYYY-MM-DD’),    … Continue reading How to convert the date into predefined format using utility module

SuiteScript 2.0 Error: no method getTime()

To get the date on a date or datetime field from a record such as that of startdate or lastmodifieddate, the string output from record.getValue() needs to be converted first to a date using N/format module’s format.parse() method. require([‘N/currentRecord’, ‘N/format’], function (nCurrentRecord, nFormat) {‌     var currentRecord = nCurrentRecord.get();     var lastModifiedDateString =… Continue reading SuiteScript 2.0 Error: no method getTime()