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
Author: Mintu Antony
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
Generating Statements
To generate statements: Go to Customers > Accounts Receivable > Generate Statements. In the Statement Date field, accept or enter the date you want to appear on your statements. Note: The system also uses this date to calculate aging. (Optional) Enter a start date for your statements. This is the date of the oldest transaction you want to appear… Continue reading Generating Statements
Split GTIN4 into GS1 Company Prefix and GS1 ID for Item Sync in NetSuite-TrackTraceRX Integration
Function to split GTIN4 into GS1 Company Prefix and GS1 ID function splitGTIN(gtin) { if (gtin.length !== 14) { throw new Error(“GTIN must be 14 digits long.”); } // Extract GS1 Company Prefix: remove the first digit and take the next 7 digits const gs1CompanyPrefix = gtin.substring(1, 8); //… Continue reading Split GTIN4 into GS1 Company Prefix and GS1 ID for Item Sync in NetSuite-TrackTraceRX Integration