Tag: Suitescript
Set Field Value Of Customer Record
We can set the value of a field in a customer record as shown below
Create image search suing suitescript
How to get custom Record data From netsuite using suitescript
When to Use: When the we want to use custom records of Netsuite in View file for showing or performing some operations using those data. JavaScript View.js suitescript ServiceController.js model.js
Show category based on domain
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
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