Scenario: We need show a warning message when an error occurs and a success message if the process completed. You can use ‘message‘ for showing warning/ information messages in a suitelet. ‘N/ui/message‘ module can be used for that. in the above example, we can create the message by using message.create method. As an option, you… Continue reading Showing Warning/ Success Messages in Suite lets
Category: Suite scripts samples
All the samples related to suite scripts.
Rate Card Search
Scenario: Create a saved search for listing the rate card price of a specific billing class with a specific currency. Eg: if the billing class is ‘Consultant’ and the preferred currency is US Dollars, search result should be the corresponding currency value. Solution:
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
Fetch Associated images in item record using suitescript
Fetch Associated images in item record using suitescript
Adding a file link in a Custom Field by script
Create a hyperlink custom field
Rescheduling using Scheduled Script
Accessing email data send from email plugin inside Suitelet script
The data can be send to a suitelet from a email capture plugin implementation javascript file using ‘POST’ method.If the suitelet is triggered in ‘POST’ method, we can access this data.The data transferred using ‘POST’ method will be inside ‘scriptContext.request.body’. Since this is transferred as JSON file, the first step on using the datais to… Continue reading Accessing email data send from email plugin inside Suitelet script
Scheduled Email For PM’s using MR script
Requirement: We need to send pending timesheet details to the corresponding project manager by end of the Day.We can use a scheduled script for the development and it will check the timesheet and send a list of pending timesheets to the corresponding project managers with necessary details such as Date,Timesheet details,Actual Hours,Employee name , timesheet… Continue reading Scheduled Email For PM’s using MR script
Case pack quantity updation with the sales order line quantity
Requirement: In the sales orders, we can enter any number of item line quantities. But from the client business perspective, they need to control the quantity based on the item case pack. The quantity should be multiples of the case pack number and if the quantity is not a case pack multiple we need to… Continue reading Case pack quantity updation with the sales order line quantity
Validate/Update Case pack quantity with the sales order line quantity
Scenario: In the sales orders, we can enter any number of item line quantities. But from the client business perspective, they need to control the quantity based on the item case pack. The quantity should be multiples of the case pack number and if the quantity is not a case pack multiple we need to… Continue reading Validate/Update Case pack quantity with the sales order line quantity