get the file from file cabinet /** * @NApiVersion 2.1 * @NScriptType MapReduceScript */ define([‘N/record’, ‘N/search’,‘N/file’], /** * @param{record} record * @param{search} search */ (record, search, file) => { /** * Defines the function that is executed at the beginning of the map/reduce… Continue reading Delete records from netsuite using Map reduce script
Author: SRUTHY N S
Apply Bill to Journal using Script
In some cases, the client applies Bills to Journals via the Bill Payment page. In such cases, we check the apply box for the relevant bills and journals such that the body amount shows 0. This can be done via UI but not csv.We can done this through scripting. Here we consider one bill can… Continue reading Apply Bill to Journal using Script
Import of customer deposit csv through script
/** * @NApiVersion 2.1 * @NScriptType ScheduledScript */ define([‘N/record’, ‘N/file’, ‘N/format’, ‘N/search’], /** * @param{record} record * @param{file} file */ (record, file, format, search) => { function findCustId(customerName) { let customerSearchObj = search.create({ … Continue reading Import of customer deposit csv through script
Import Customer Deposit CSV via Script (old version)
CSV Import of Customer Deposit can be accomplished by uploading the CSV file in the File Cabinet and using nlapiLoadFile to read and save it line by line. // load csv file from file cabinet var arrLines = nlapiLoadFile(1913).getValue().split(/n|nr/); // loop to get all lines for (var i = 1; i < arrLines.length – 1;… Continue reading Import Customer Deposit CSV via Script (old version)
Implementation of Maker checker policy using User Event and client scripts
User event script: /** * @NApiVersion 2.1 * @NScriptType UserEventScript */ define([‘N/currentRecord’, ‘N/record’, ‘N/search’, ‘N/runtime’, ‘N/ui/serverWidget’], /** * @param{currentRecord} currentRecord * @param{record} record * @param{search} search * @param{runtime} runtime */ (currentRecord, record, search, runtime, serverWidget) => { /** * Defines the function definition… Continue reading Implementation of Maker checker policy using User Event and client scripts
Add Custom Field on Entity Record to Address Subtab
To display a specific custom Entity field in the Address subtab of an Entity record, perform the following steps: Navigate to Customization > Lists, Records, & Fields > Entity Fields Click the desired field. Click Display Subtab: Select Main Click Save To add the created custom field in the subtab, Navigate to Customization > Forms… Continue reading Add Custom Field on Entity Record to Address Subtab
create function with object for key-value mapping
/** * Function used to get the internal Id of the currency * @param {string} currency – Zoho Opportunity stage * @returns {number} currencyID – Internal ID of the currency */ function getCurrency(currency) { … Continue reading create function with object for key-value mapping
Get the deleted record data from zoho crm and update the change in NetSuite accordingly.
to fetch the deleted data,we can use Request URL: https://www.zohoapis.com/crm/v2/{module_api_name}/deleted /** * Defines the function that fetches deleted Zoho data. * @param {Object} customRecord – The custom record containing Zoho last run information * @param {string} accessToken – The access token to authenticate with Zoho API * @param {string} lastRunTime – The last run time… Continue reading Get the deleted record data from zoho crm and update the change in NetSuite accordingly.
Diffent status code in zoho api calls
The 200 series : OK – HTTP 200 The API request is successful. Created – HTTP 201 Message: record added. Request fulfilled for record insertion. Accepted – HTTP 202 The request has been accepted. Generally, the server takes time to complete the process. No Content – HTTP 204 There is no content available for the… Continue reading Diffent status code in zoho api calls
Fetch and Process Data From ZOHO CRM
In zoho crm integration with NetSuite,we can fetch and process the zoho data using API call. Create a header object for api call: let headerObj = { Authorization: “Zoho-oauthtoken “ + accessToken, “If-Modified-Since”: lastRunTime, … Continue reading Fetch and Process Data From ZOHO CRM