Emails attached to the records can be seen under the communication subtab. We can add a new email entry here by using the ‘N/message’ record without actually sending any email. Message records can be edited only during the create operation. After they are created and submitted, existing message records cannot be edited. Existing message records… Continue reading Attach email data to a record without sending an email
Author: Derin Jose
Show custom HTML tables/components inside the NetSuite record
We can add custom HTML tables/components inside any NetSuite record body or subtabs using an ‘Inline HTML’ field. For this first create a ‘inline HTML’ field inside the required record. Add the HTML code in the ‘Default value’ field under the ‘Validation & Defaulting’ subtab in the field record. For this, we can check the… Continue reading Show custom HTML tables/components inside the NetSuite record
Fetch the workflow field values related to the record deployed in suite-script using a saved search
Recently I had to fetch the values of workflow fields from within a Suitelet that is triggered by a button action. Workflow fields can be updated based on field value updates in a NetSuite record but there is no direct way of fetching these values in a script. For this, I used a saved search… Continue reading Fetch the workflow field values related to the record deployed in suite-script using a saved search
Add search query as the data source to a template
We can pass search query as a data source to a template instead of a single record data.Use the function TemplateRenderer.addQuery(options) for this. This is a part of the N/render module and is available for all server scripts(of the 2.x version).The parameters require are: ‘options.id’ of string type which stores the id of search if… Continue reading Add search query as the data source to a template
Add custom values as the data sources to a template
We can pass custom objects, and XML values as data sources to a template instead of a single record data.Use the function TemplateRenderer.addCustomDataSource(options) for this. This is a part of the N/render module and is available for all server scripts(of the 2.x version).The parameters require are: ‘options.alias’ of string type which stores alias for the… Continue reading Add custom values as the data sources to a template
How to display a date object as a date value in another timezone
In Javascript, the date object does not store any specific timezone value. The time is stored in the value of the local timezone relative to GMT(Greenwich Mean Time). If we print the time object, we can see that the time is represented as a value with a sign and offset from the UTC(Coordinated Universal Time)… Continue reading How to display a date object as a date value in another timezone
Different Timezone Abbreviations and Time Offset values for Date Object Creation
Following is a list of country codes, their timezone identifiers, the timezone offset in each of these regions with respect to UTC, and the standard Timezone abbreviations for each location. These are very useful when you want to convert the time object value in a specific time zone to a time object value in a… Continue reading Different Timezone Abbreviations and Time Offset values for Date Object Creation
Saved search to select transactions created in the last few seconds/minutes/hours
NetSuite provides the option to filter out the transactions created by the user in the last few seconds/minutes/hours. We can also use this method to filter out records on ‘date fields’ storing the exact time. Below is an example of a saved search to fetch the sales orders created in the last few minutes: Criteria… Continue reading Saved search to select transactions created in the last few seconds/minutes/hours
Methods to connect a Saved Search in NetSuite to a Suitescript
We can create a saved search inside the suite script and run it using the ‘N/search’ module functions. But there can be instances where the search result should be fetched byrunning an existing saved search present in the NetSuite account. This is when the user wants to update the saved search conditions over time without… Continue reading Methods to connect a Saved Search in NetSuite to a Suitescript
Sublist item selection method for items rendered in a custom suitelet page
We can select an item from a sublist using the index. If we use the line index we can use the selectLine() function for this.We can also calculate the index value using the line Id. The line id is usually one value greater than the index value. But this can be different if some items… Continue reading Sublist item selection method for items rendered in a custom suitelet page