How to get the names of next two months

function getMonthName() {             try {                 const monthNames = [‘January’, ‘February’, ‘March’, ‘April’, ‘May’, ‘June’, ‘July’, ‘August’, ‘September’, ‘October’, ‘November’, ‘December’];                 let currentDate = new Date();                … Continue reading How to get the names of next two months

How to create a PDF of the custom record based on the designed PDF template.

function generatePdf(newRecord) {             try {                 let customId = newRecord.id                 let xmlTmplFile = file.load({ id: TEMPLATE_ID });                 let myFile = render.create();          … Continue reading How to create a PDF of the custom record based on the designed PDF template.

How to find out the index of a particular field value from an array of object

                        let a = resultArrayDiscount.findIndex(item => item[“Item Category List”].value === resultArrayItem[i][“Item Category”][“value”]);                         let discount = 0;                         let discountCodePercentage = ”… Continue reading How to find out the index of a particular field value from an array of object