Add the config module in the script const getLogo = () => { try { let configRecObj = config.load({ type: config.Type.COMPANY_INFORMATION }); … Continue reading How to get the logo of the NetSuite Account using script
Author: Shanmugapriya Ganesh
How to create a csv file of saved search using script
Use the task module //Create a task for saved search let searchTask = task.create({ taskType: task.TaskType.SEARCH }); searchTask.savedSearchId = saved search internal id;searchTask.filePath = filePath//where the… Continue reading How to create a csv file of saved search using script
How to check condition in PDF template
In the PDF template, we can check the condition using <#if>. Here we are showing an image only if the sales order location is ‘Outlet Center’. <#if record.custbody_aha_sales_location=”Outlet Center”> <#if companyInformation.logoUrl?length != 0> Airport Home Appliance –Builder Division${record.location.address1}${record.location.city} ${record.location.state} ${record.location.zip}${record.custbody_aha_sales_location.phone} Sales Invoice #${record.tranid} ${record.trandate} The source code is metioned below. <#if record.custbody_aha_sales_location=”Outlet Center”> <img src=”src… Continue reading How to check condition in PDF template
How to disable a field using client script.
In the client script we can get the field using field id. let currentRecord=scriptContext.currentRecord; let fieldName = currentRecord.getField({ fieldId: ‘fieldid’ }); fieldName.isDisabled = true; We can… Continue reading How to disable a field using client script.
How to create online html form templates
For this ‘Marketing Automation” feature must be enabled. THen only we can get the online html form and the template. Lists>Marketing>Marketing Templates > new Then Click the source code and type <NLFORM></NLFORM>. With in that create a html template. To save the values in the custom record use following . In the field type select… Continue reading How to create online html form templates
How to assign the object values in script
Here we assign the objects based on the item and unique key(line number). let linecount = newRec.getLineCount({ sublistId: ‘item’ }); let totalWeightValues = {}; // Get the values of quantity and item weight. for… Continue reading How to assign the object values in script
How to combine the saved search as objects of objects
Here the saved search results are combined based on the internal id. let itemReceiptData = {}; transferorderSearchObj.run().each(function (result) { let temp = {}; temp.item = result.getValue({ … Continue reading How to combine the saved search as objects of objects
How to get the date includes the committed and today n saved search
Create a saved search and add the necessary filters. Then in the summary of criteria add the following code. Here we have checked the last committed date as 12 days ago for the Item Statua as A, B, C or O. If the status is S then last committed date is 43 days ago. …. … Continue reading How to get the date includes the committed and today n saved search
How to connect SFTP server using script
First, you have to copy the code for generating Password GUID and Host key. It is suite let code for generating the GUIDs. Just copy that code and deploy the script and execute the script foe one time. While executing you have to mention the script which is going to use for SFTP connection. You… Continue reading How to connect SFTP server using script
How to create a task with dependent script using map/reduce script.
The scheduled or map/reduce script only used as a dependent script. Here we used the saved search to convert the search result as a csv file and stored in the file cabinet. // Specify a file for the search results let asyncSearchResultItemFile = ‘file path need to give… Continue reading How to create a task with dependent script using map/reduce script.