To group the data in the query search, we can add the groupBy: true to the column we want to group in the query and add the aggregate to the column for the aggregation. for example: query.Aggregate.SUM sample code: itemJoin.createColumn({ fieldId: ‘itemId’, … Continue reading Group the data within the query search.
Author: Anjo Joseph
Query search to fetch the data from different records
The following function can be used to fetch the data from different records using the query search. function querySearch(reportAppliedFilter) { let requisitions = []; try { var requisitionQuery = query.create({ … Continue reading Query search to fetch the data from different records
Rotate the data in the Advanced PDF Template
A portion of the data can be rotated in the PDF by adding “rotate=”90″” to the div. <div position=”absolute” rotate=”90″> <table> <tr><td>test</td></tr> <tr><td>test</td></tr> </table> </div>
The script used to create the CSV file using JSON data and save the file in the filecabinet folder.
The following function can be used to create the CSV file using JSON data and save the file in the file cabinet folder. /** * @description creates the csv file using JSON data. The papaparse library used to unparse the JSON data for the CSV file creation … Continue reading The script used to create the CSV file using JSON data and save the file in the filecabinet folder.
script for XML to JSON Parser
The following code can be used to convert XML to JSON. define([“require”, “exports”, “N/xml”], function (require, exports, xmlModule) { “use strict”; Object.defineProperty(exports, “__esModule”, { value: true }); exports.xml2json = exports.nsXMLToJSON = exports.xmlToJson = void 0; //https://stackoverflow.com/a/57735605 const xmlToJson = (xmlString) => { … Continue reading script for XML to JSON Parser
Dispatch Track APIs
The following curls can be used for NetSuite-Dispatch track integration. Get Oauth2 Access Token curl –location ‘https://dtdapi.dispatchtrack.com/api/v1/oauth2/token’ –header ‘Content-Type: application/x-www-form-urlencoded’ –header ‘Accept: application/json’ –header ‘Authorization: Basic {access_token}’ –data-urlencode ‘grant_type=client_credentials’ Delete Orders from DIspatch track curl –location –request DELETE ‘https://dtdapi.dispatchtrack.com/api/v1/delete-order?order_number={dt_order_no}’ –header ‘Accept: application/json’ –header ‘Authorization: Bearer {access_token}’ Get Orders from the dispatch track curl –location ‘https://dtdapi.dispatchtrack.com/api/v1/export’… Continue reading Dispatch Track APIs
Creates a deployment for a script with a new script ID using script
The Following function can be used for creating a new deployment for a script with a new script ID. /** * Creates a deployment for a script with a new script ID. * @param {string} deploymentInternalId – The internal ID of the existing deployment. * @param {string} newScriptId – The new script ID for the… Continue reading Creates a deployment for a script with a new script ID using script
Retrieves the URL associated with a given file name
The following function can be used for retrieving the URL associated with a given file name. /** * Retrieves the URL associated with a given file name. * @param {string} fileName – The name of the file to retrieve the URL for. * @returns {string} The URL corresponding to the provided file name. */ … Continue reading Retrieves the URL associated with a given file name
Proposal for Auto Invoice creation from different CSV files
Proposal Summary This proposal documentation outlines the scope of setting up an auto invoicing in NetSuite from different file structures. Requirement The client aims to automate the creation of invoices by integrating with six different external applications, each with its unique data models from six different subsidiaries. Currently, they are using different applications and data… Continue reading Proposal for Auto Invoice creation from different CSV files
How to use the suiteql to fetch the data from NetSuite records using postman
The following curl can be used for fetching the data from NetSuite records using Suiteql. curl –location ‘https://{ACCOUNT_ID}.suitetalk.api.netsuite.com/services/rest/query/v1/suiteql?limit=1000&offset=0’ –header ‘Content-Type: application/json’ –header ‘Accept: application/json’ –header ‘prefer: transient’ –header ‘Authorization: OAuth realm=”[AccountID]”,oauth_consumer_key=”[CONSUMER_KEY]”,oauth_token=”[ACCESS_TOKEN]”,oauth_signature_method=”HMAC-SHA256″,oauth_timestamp=”1711082395″,oauth_nonce=”lE426dBrpwV”,oauth_version=”1.0″,oauth_signature=”[OAUTH_SIGNATURE]”‘ –data ‘{ “q”: “SELECT transaction.id AS upstreamId, customer.companyName, customer.entitytitle, customer.entityid, transaction.number, ”’D/M/YYYY”’ AS dateFormat, transaction.tranDate AS invoiceDate, transaction.dueDate AS paymentDueDate, transaction.total AS invoiceValue, transaction.total… Continue reading How to use the suiteql to fetch the data from NetSuite records using postman