Creation of a Journal Record based on Dynamic Filters in search in getting the data. We are getting the data from weekly timesheet record. /*** @NApiVersion 2.1 * @NScriptType MapReduceScript */ define([ “N/search”, “N/config”, “N/format”, “N/record” ], (search, config, format, record) => { /** … Continue reading Journal Creation Script
Author: Aswathy Viswanathan
How to get unique values from an Array
let testArray = [1,2,3,1,3,4,1,1,2] let uniqueValues = […new Set(testArray )]; The restult uniqueValues array will be [1,2,3,4] We can use Set function for get the unique values from the array
How to Add Serial Sequence number in Advanced PDF Templates
<#if record.item?has_content> <table style=”width: 100%; border: 1px solid black; margin-top:10px; “> <!– start items –> <#list record.item as item> <#assign totalValue = totalValue + item.amount> <#if item_index==0> <tr colspan = “20”> <th colspan=”3″ border-bottom=”1″ border-right=”1″ align=”center”>SI No</th> <th colspan=”10″ border-bottom=”1″ border-right=”1″ align=”center”>Details of items with all specification</th> <th colspan=”3″ border-bottom=”1″ border-right=”1″ align=”center”>Qty in Nos</th> <th… Continue reading How to Add Serial Sequence number in Advanced PDF Templates
How to Add Orderd List in Advanced PDF templates
<table style=”width: 100%; border: 1px solid black; margin-top:10px; “> <tr colspan = “20”> <td colspan = “20” border-bottom=”1″><b>Terms and Conditions</b></td> </tr> <tr colspan = “20”> <td colspan = “20”> <ol> <li>Payment term: Price inclusive of all taxes etc.</li> <li>Tax exemption: GST is exempted since working under Special Economic… Continue reading How to Add Orderd List in Advanced PDF templates
How to fit a background image to a PDF template
<macro id=”watermark”> <div style=”position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1;”> <img src=”https://td2895498.app.netsuite.com/core/media/media.nl?id=3469&c=TD2895498&h=xnOQ9Xtr1A20WneG2FLf2m0qx8OH4sR9AuLJhHo-5Q5lhWF_” style=”width: 11in; height: 8.5in;”/> </div> </macro>
How to display current date in the PDF Template
<#assign aDateTime = .now> <#assign aDate = aDateTime?date> <td colspan=”10″ style=” line-height:100px;”> <span style=”font-size: 30pt;”><b>DATE: ${aDate}</b> </span> </td>
How to Hide a sublist field in Client Script
function fieldChanged(scriptContext) { // Specify the particular field change condition var itemField = form.getSublist({id: ‘item’}).getField({id: ‘item’}); itemField .isDisplay = false }
How to hide a body level Field Using Client Script
function fieldChanged(scriptContext) { // Specify the particular field change condition let subCategoryField = currentRec.getField({ fieldId: ‘custevent_jj_travel_sub_category_list’ }); subCategoryField.isDisplay = false }
How to Get Work Calender Data
We can create a search within the work calendar record to get the necessary data. Here we have returned the hours per day specified in the Work calender record let workcalendarSearchObj = search.create({ type: “workcalendar”, … Continue reading How to Get Work Calender Data
How to Hide the files in the custom record without using a scripts
Go to the corresponding field in the custom record. Then Under the Access Subtab, We can set the Access Levels Default Search or Reporting access permission as None. Then under the Roles subtab we can select the particular roles and can assign the permission to them for this field