<#if item.custrecord_vr_svcord_item_lotnum?length > 3> <td colspan=”7″ style=”border: 1px solid rgb(187, 187, 187);” align=”left”> ${item.custrecord_vr_svcord_item_lotnum} </td> <#else> <td colspan=”7″ style=”border: 1px solid rgb(187, 187, 187);” align=”center”> <#if item.custrecord_vr_svcord_item_lotnum?has_content> ${item.custrecord_vr_svcord_item_lotnum} <#else> … Continue reading Change alignment in advanced pdf/html template according to character length
Author: Rashmi Joshi
Set current Date and Time to Date/time field
Setting Date through script to Date/time field may throw invalid field value error. The value can be set through workflow by setting field value as today.
User access link expiration
The number of hours before the URL for new user access provisioning will expire. The default value is 24 hours. Valid values range from one (1) hour to 72 hours. The default value, 24 hours, is hard-coded in the in the following standard user access email templates: Customer Center Access Email Partner Center Access Email… Continue reading User access link expiration
ClearTax API Configuration: Terms and Descriptions
Setting up the ClearTax API configuration in NetSuite involves specifying several URL endpoints for various functionalities. Each endpoint has a distinct purpose and requires a clear understanding to ensure proper integration. Below is a detailed explanation of each field for both GST and TDS contexts. 1. Generate IRN Endpoint Explanation: This field stores the URL… Continue reading ClearTax API Configuration: Terms and Descriptions
Hide a button using jQuery
function beforeLoad(scriptContext) { let form = scriptContext.form; // Create an inline HTML field to inject the script let inlineHtmlField = form.addField({ id: ‘custpage_inlinehtml’, type: serverWidget.FieldType.INLINEHTML, label: ‘Inline HTML’ }); // Script to hide the row using jQuery let script = “<script>jQuery(document).ready(function() { jQuery(‘Button_ID’).hide(); });</script>”; // Set the default value of the inline HTML field to… Continue reading Hide a button using jQuery
hyperlink text fields with default values
When you create a hyperlink text field and set a default value while having the “Store Value” option checked, the field will not display the default value as expected. Issue Explanation Hyperlink Text Field: A custom field type used to store URLs. Default Value: A value that is pre-filled when the field is used in… Continue reading hyperlink text fields with default values
multiple-select fields cannot be used as filters
The primary reason multiple-select fields cannot be used as filters is due to how these fields are structured and stored within the system. Multiple-select fields allow users to select more than one option from a list, which complicates the filtering process. Recognizing the need for improved functionality, there has been an enhancement request filed under… Continue reading multiple-select fields cannot be used as filters
Identify digits within a string
function extractDigits(text) { var regex = /bd+b/g; var matches = text.match(regex); return matches ? matches : []; } // Usage var text = “Order numbers: 123, 456 and 789.”; var digits = extractDigits(text); console.log(digits); // Output: [“123”, “456”, “789”] Explanation /bd+b/g: The regex pattern to match standalone digits. b: Word boundary to ensure digits are… Continue reading Identify digits within a string
How to Automatically Refresh a Suitelet Page Every Few Minutes
Refreshing a Suitelet page automatically can be useful for displaying up-to-date information without user intervention. This can be achieved using JavaScript’s setTimeout function to reload the page at specified intervals. Using setTimeout to Refresh the Page To refresh a Suitelet page automatically, you can use the following JavaScript code snippet: setTimeout(function() { location.reload(); }, 300000);… Continue reading How to Automatically Refresh a Suitelet Page Every Few Minutes
How to Use the Same Script for Different Records with Different Parameters in NetSuite
To customize the behavior of a NetSuite script for different records, use the getParameter() function. This function returns the value of a script parameter for the currently executing script, allowing you to pass different parameters to the same script. Here’s how to use it in SuiteScript 2.0 and set the parameter value at deployment. define([‘N/runtime’,… Continue reading How to Use the Same Script for Different Records with Different Parameters in NetSuite