(function (iNum, uniqueUrl) { fetch(uniqueUrl, { method: “POST”, headers: { … Continue reading While creating Suitelet report, how to identify the file type?
Author: Linu Paul
How to create a Journal Entry through script
function createJournal(invoiceSum, reduceContext, cutomId) { try { let rec = record.create({ type: record.Type.JOURNAL_ENTRY, isDynamic: true, }); rec.setValue({ fieldId: ‘memo’, value: ‘Script through created JE to write off the balance’ }); let accountObj = { “debit”: 374, “credit”: 119 } for (let key in accountObj) { rec.selectNewLine({ sublistId: “line”, }); rec.setCurrentSublistValue({ sublistId: “line”, fieldId: “account”, value:… Continue reading How to create a Journal Entry through script
How to disable the column
if (scriptContext.sublistId == ‘item’) { let lineNum = currentRec.getCurrentSublistValue({ sublistId: scriptContext.sublistId, fieldId: ‘line’ })?.toString()?.trim(); let lineKey = currentRec.getCurrentSublistValue({ sublistId: scriptContext.sublistId, fieldId: ‘lineuniquekey’ })?.toString()?.trim(); let lineIndex = currentRec.getCurrentSublistIndex({ sublistId: ‘item’ }); if (lineNum && lineKey) { let lineValue = Number(currentRec.getCurrentSublistValue({ sublistId: scriptContext.sublistId, fieldId: ‘quantitybilled’ })?.toString()?.trim() || 0); if (lineValue) { let sublistObj = currentRec.getSublist({ sublistId: scriptContext.sublistId… Continue reading How to disable the column
How to restrict the execution of a User Event script while executing Map/reduce script
In the deployment page, go to the context filtering tab. go to Execution Context tab. Remove the ‘Map/Reduce’ from the list box. Click on Save.
How to create a search to find out the GL Impact changes within a record.
var itemfulfillmentSearchObj = search.create({ type: “itemfulfillment”, filters: [ [“type”,”anyof”,”ItemShip”], “AND”, [“posting”,”is”,”T”], “AND”, [“systemnotes.field”,”anyof”,”TRANDOC.IMPACT”], “AND”, [“systemnotes.newvalue”,”isnotempty”,””], “AND”, [“shipping”,”is”,”F”], “AND”, [“taxline”,”is”,”F”], “AND”, [“cogs”,”is”,”F”], “AND”, [“systemnotes.name”,”anyof”,”-4″], “AND”, [“mainline”,”is”,”F”], “AND”, [“systemnotes.date”,”within”,”today”] ], columns: [ search.createColumn({ name: “date”, join: “systemNotes”, label: “Date” }), search.createColumn({ name: “name”, join: “systemNotes”, label: “Set by” }), search.createColumn({ name: “field”, join: “systemNotes”, label: “Field” }),… Continue reading How to create a search to find out the GL Impact changes within a record.
How to create a system email template in NetSuite
setup — company — System Email TemplatesThen customize the standard template.Assign this template in email preferences (setup — company — email preferences — templates)