When “anyof” operator is not available in search criteria then IN operator can be used as following: let lineUniqKey = [“48662″,”48663″,”48664″,”48665”]; let uniqKeyIfMapping = {}; // Object to store the mapping of lineUniqKey to IF number let inClauseValues = lineUniqKey.map(value => `’${value}’`).join(“,”); // Convert array to IN clause string let filters = [ [ [“type”,… Continue reading Using IN operator along with formula text in search filter
Author: Mintu Antony
Function to handle “Error Parsing XML: The entity name must immediately follow the ‘&’ in the entity reference” error
When following error is obtained: “Error Parsing XML: The entity name must immediately follow the ‘&’ in the entity reference.”, Use the escapeSpecialChar function function escapeSpecialChar(textvalue) { try { textvalue = textvalue.replace(/&/g, ‘&’); … Continue reading Function to handle “Error Parsing XML: The entity name must immediately follow the ‘&’ in the entity reference” error
Calling a backend suitelet from a suitelet to handle exceeding of governance limit
A backend suitelet is called from main suitelet to handle exceeding of governance limit. Main suitelet let postData = { labelCounterValue: labelChunks[i].length, label: label, printString: printString[i], labelChunkLength:… Continue reading Calling a backend suitelet from a suitelet to handle exceeding of governance limit
Access Sublists and a Subrecord from a Record
Sample code to access sublists and a subrecord from a record. /** * @NApiVersion 2.x */ require([‘N/record’], function(record) { function createPurchaseOrder() { var rec = record.create({ type: ‘purchaseorder’, isDynamic: true }); … Continue reading Access Sublists and a Subrecord from a Record
Record.selectNewLine(options)
Record.selectLine(options)
Validation alert in Payment record
Created the “Sales Rep Allocation” subtab in the payment record and implemented a validation alert to ensure that the payment total matches the amount allocated to the sales representatives. function saveRecord(context) { var currentRecord = context.currentRecord; console.log(“customer payment”) if (currentRecord.type === “customerpayment”) { var getLineCount = currentRecord.getLineCount(‘recmachcustrecord_vs_paymentsalesrep_pa’); var totalPay = currentRecord.getValue(‘payment’); var splitted = 0;… Continue reading Validation alert in Payment record
Conventions for Naming Custom Objects
The following table lists the prepended string used for each custom object type ID or Script ID. It also shows the character limit for the ID or Script ID field.
Printing Individual Statements
Follow this procedure to print a single statement. To print an individual statement: Go to Customers > Accounts Receivable > Individual Statement. Select the customer you want to generate and print a statement for. In the Statement Date field, accept or enter the date you want to appear on the statement. In the Start Date field, set the date of… Continue reading Printing Individual Statements
To display Sale Price, Amount & GP on Requisition & PO on button click
To display Sale Price, Amount & GP on Requisition & PO on button click define([‘N/record’, ‘N/search’, ‘N/currentRecord’, ‘N/url’], function (record, search, currentRecord, url) { function pageInit() { } /** * @description Function to check value * @param {*} parameter * @returns boolean … Continue reading To display Sale Price, Amount & GP on Requisition & PO on button click