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
Author: Mintu Antony
Inventory worksheet
Transactions > Inventory > Adjust Inventory Worksheet Not for serial/lot numbered items. Adjustment is for total amount of an item. New entries overwrite inventory quantities on previous transactions. Applies an average costing method. CSV template for csv import
Map Reduce script to link Manufacturer records(custom) with Vendors
Map reduce script that will process all Vendor RFQ record lines that had a response entered in the previous day. Manufacturer record is a custom record. define([‘N/search’, ‘N/record’, ‘N/runtime’], function (search, record, runtime) { /** * @description Function to get authorized vendor id * @param {*} manufacturerId … Continue reading Map Reduce script to link Manufacturer records(custom) with Vendors
Customer sync from NetSuite to multiple TrackTrace
Customer sync from NetSuite to multiple TrackTrace. It is to be done based on subsidiaries included in the subsidiary sublist. define([‘N/record’, ‘N/search’, ‘N/ui/serverWidget’, ‘../../Common Library/jj_tracktracerx_ns_utility.js’, ‘../../Config Module/jj_cm_tracktracerx_api_config.js’], /** * @param{record} record * @param{search} search * @param{serverWidget} * @param{jjUtil} jjUtil * @param{TrackTrace} TrackTrace */ (record, search,… Continue reading Customer sync from NetSuite to multiple TrackTrace
Vendor sync from NetSuite to multiple TrackTrace
Vendor sync from NetSuite to multiple TrackTrace. It is to be done based on subsidiaries included in the subsidiary sublist. define([‘N/record’, ‘N/search’, ‘N/ui/serverWidget’, ‘../../Common Library/jj_tracktracerx_ns_utility.js’, ‘../../Config Module/jj_cm_tracktracerx_api_config.js’], /** * @param{record} record * @param{search} search * @param{serverWidget} * @param{jjUtil} jjUtil * @param{TrackTrace} TrackTrace */ (record, search,… Continue reading Vendor sync from NetSuite to multiple TrackTrace
Client script to prevent creation of duplicate manufacturer records (custom record type)
Client script to prevent creation of duplicate manufacturer records (custom record type) Example: We have an existing manufacturer record “TE Connectors Inc.” and somebody tries to create “TE Connectors” this should present a warning, showing the current record and then a confirmation if they would like to proceed and create the record. Same if someone… Continue reading Client script to prevent creation of duplicate manufacturer records (custom record type)
Scheduled integration of Item Receipt (IR) Sync from multiple TrackTraceRX to NetSuite
Scheduled integration of Item Receipt (IR) Sync from multiple TrackTraceRX to NetSuite define([‘N/record’, ‘N/search’, ‘N/format’, ‘N/config’, ‘../../Common Library/jj_tracktracerx_ns_utility.js’, ‘../../Config Module/jj_cm_tracktracerx_api_config.js’], /** * @param{record} record * @param{search} search * @param{format} format * @param{config} config * @param{jjUtil} jjUtil * @param{TrackTrace} TrackTrace … Continue reading Scheduled integration of Item Receipt (IR) Sync from multiple TrackTraceRX to NetSuite
Adding Customer Name to PDF without setting column limit
Adding Customer Name to PDF without setting column limit. Advanced HTML template code for below PDF. <?xml version=”1.0″?> <!DOCTYPE pdf PUBLIC “-//big.faceless.org//report” “report-1.1.dtd”> <pdf> <head> <!– Arabic font link (stored in file cabinet) –> <#assign fontlink=’https://5102772.app.netsuite.com/core/media/media.nl?id=3867&c=5102772&h=8cqeuYf7ebqHy4QZt_MBUG7Hoi0GZID7vzzbpJr6BkQZWYRI&_xt=.ttf’> <link name=”arabic-font” type=”font” subtype=”opentype” … Continue reading Adding Customer Name to PDF without setting column limit
Add Custom Button to Execute a Suitelet
/** * @NApiVersion 2.1 * @NScriptType UserEventScript * @NModuleScope SameAccount */ define([‘N/runtime’, ‘N/log’], (runtime, log) => { function beforeLoad(scriptContext) { try { const recCurrent = scriptContext.newRecord; const objForm = scriptContext.form; const stStatus = recCurrent.getValue({ fieldId: ‘status’ }); const stSuiteletLinkParam = runtime.getCurrentScript().getParameter({ name: ‘custscript_suiteletlink’ }); const suiteletURL = ‘”‘ + stSuiteletLinkParam + ‘”‘; if (stStatus ===… Continue reading Add Custom Button to Execute a Suitelet
Script to set line price and alt price to 0 when closed
Set line price and alt price to 0 when closed. /** * Function to be executed when field is changed. * * @param {Object} scriptContext * @param {Record} scriptContext.currentRecord – Current form record * @param… Continue reading Script to set line price and alt price to 0 when closed