If category needs to show based on domain, then we can achieve it by using extension in SCA. Create a field in the commerce category to select the domains. And by using saved search get the categories belong to the given domain. Then extend the Categories’ in ‘suitescript’ to show the result categories in the… Continue reading Show category based on domain
Tag: Suitescript
Automate the CSV imports via Suitescript
using scheduled script we can automate csv import.The file to be imported will be stored in the filecabinet. Solution: Step 1: a) Create a Field Map for the CSV File Note: Field Mapping offers a 1-to-1 relationship between the fields on the CSV File and NetSuite Fields. b) Navigate to Setup > Import/Export > Import… Continue reading Automate the CSV imports via Suitescript
Using the Function fieldChanged() setting the field ‘shipping cost’ when the Field ‘Shipmethod’ changes.
How to create function which gives 4 digits unique number for setting the SKU in Item record ( Any number between 1-9999 )
Solution:
Using relative path for file.load() function
To open a file in a suitescript we can use file.load() function.e.g:var fileObj = file.load({id: ‘Images/myImageFile.jpg’});fileObj.description = ‘my test file’;var fileId = fileObj.save();The id field takes the path to the file like shown in the above example or internal of the exact file. See this example:var fileObj = file.load({id: 123});fileObj.description = ‘my test file’;var fileId… Continue reading Using relative path for file.load() function
Passing values to Script parameters via Suitescript
Script parameters are useful when there is a requirement to store data specific to a script but more accessible to all users other than developers. Using script parameterswe can avoid hardcoding certain values to the code that is required to be modified often. Also these values can be modified by anyone having access to the… Continue reading Passing values to Script parameters via Suitescript
Reducing the Recurrence count by one whenever a user creates a copy of the PO record in Before Submit Trigger using User Event Script in Netsuite.
Steps:- First visit a Parent PO record. Click on edit and enter a desired positive integer value in the Number of Recurrence field. Click on save. Make a copy of the Parent PO. Save the child record or copy of that PO. Navigate to the respective or related Parent PO. The number will be reduced… Continue reading Reducing the Recurrence count by one whenever a user creates a copy of the PO record in Before Submit Trigger using User Event Script in Netsuite.
Fetch Associated images in item record using suitescript
Fetch Associated images in item record using suitescript
Saving Search Result contents in file
Scenario: Adding search details to a new text file. Search details are converting to string and saving that file.
Send Email using Email Template
To create an email template record: Go to Documents > Templates > Email Templates > New. In suitescript file add code: