File Cabinet FreeMarker Directive

If you edit templates in the source code, you can use the filecabinet FreeMarker directive to reference files directly from the File Cabinet. By using this directive, you can embed text, images, and fonts that are stored in the File Cabinet into the template. For example: <@filecabinet nstype=”image” src=”https://<accountID>.app.netsuite.com/core/media/media.nl?id=21&c=4130331&h=fb3b8b4ac4f67b2c369b”/> When you add an image to… Continue reading File Cabinet FreeMarker Directive

Resolve error: “Transaction subsidiary XXX is not valid for item XXX. Please choose a different item.”

User uses Global Inventory Relationship record in their Intercompany Cross-Subsidiary Fulfillment feature in NetSuite OneWorld account to fulfill orders and receive returns across multiple subsidiaries. On the creation of Sales Order, the user encounters an error upon saving a Sales Order supported by a Global Inventory Relationship: “Transaction subsidiary XXX is not valid for item… Continue reading Resolve error: “Transaction subsidiary XXX is not valid for item XXX. Please choose a different item.”

Map Link Customization

Generate Map link based on the bill address information such as address1, address2 and address3 only. Create custom field to store the map link for the Billing Address with the following parameters specified. Label: Map ID: _map Type: Hyperlink Store Value: Not checked Applies To: Customer Display / Subtab: Main Display / Link Text: Click… Continue reading Map Link Customization

SuiteScript updates for NetSuite 2024.1

2024.1 SuiteScript Records Browser The 2024.1 SuiteScript Records Browser is not yet available. Removal of the Ext JS Library NetSuite has started the process to remove the unsupported Ext JS library. If your customizations rely on this library’s API, despite its lack of support, you should prepare for this removal as soon as possible. The… Continue reading SuiteScript updates for NetSuite 2024.1

Automate Closing Work Orders using Map/Reduce script 2.1

/**  * @NApiVersion 2.1  * @NScriptType MapReduceScript  * @NModuleScope SameAccount  */  define([‘N/search’, ‘N/record’, ‘./jj_common_library_sbsun762.js’],  /** * @param{format} format * @param{record} record * @param{search} search * @param{commonLibrary} commonLibrary */  (search, record, commonLibrary) => {              /**       * Defines the function that is executed at the beginning of the map/reduce… Continue reading Automate Closing Work Orders using Map/Reduce script 2.1

Show Kit Components in Packing Slip print

Show components of Kit as in format of below in advanced PDF print <#if record.item?has_content>   <table style=”width: 100%;”>       <#list record.item as item>         <#if item_index==0>           <thead>               <tr>               <th align=”left” … Continue reading Show Kit Components in Packing Slip print

An error occurred while saving the Return Authorization : “an Error Occurred While Processing Item Options”

Upon Return Authorization creation, an error notice “An error occurred while processing item options” was received. Solution   Create a test manual Return Authorization Look for Custom Fields where an error is thrown Example: One of the Custom Column Field on the Return Authorization has this error: ‘Field ‘startdate’ Not Found’   Go to Customization > Lists, Records & Fields >Transaction Line Fields to… Continue reading An error occurred while saving the Return Authorization : “an Error Occurred While Processing Item Options”

Convert String into Object in Advanced PDF Template

In FreeMarker, you can use the ?eval directive to evaluate a string as a FreeMarker expression. Here’s how you can convert a string representing a JSON object into an actual object in an Advanced PDF/HTML template: <#assign jsonString = ‘{“line”:”1″,”remaining”:1}’> <#assign jsonObject = jsonString?eval?json_string> <tr>   <td>Line: ${jsonObject.line}</td>   <td>Remaining: ${jsonObject.remaining}</td> </tr>

Convert date with any format into DD/MM/YYYY format

To convert a date with any format into DD/MM/YYYY format using the Moment.js library in JavaScript, you can follow these steps: Use Moment.js to parse and format the date: <!DOCTYPE html> <html lang=”en”> <head>  <meta charset=”UTF-8″>  <meta name=”viewport” content=”width=device-width, initial-scale=1.0″>  <title>Date Format Example</title>  <script src=”https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.29.1/moment.min.js”></script> </head> <body> <script>  // Your date string with any format… Continue reading Convert date with any format into DD/MM/YYYY format