In order to check whether a field value contains a particular word or not ,We can use indexOf method. For example : In Script check whether Tracking Number field value contains “PRO#” value or not ? Solution: var trackingNumber = ifRec.getValue({ fieldId: ‘tracking_number’ }); var index = trackingNumber.indexOf(“PRO#”); if(index != -1){ alert(“PRO# found”); } else { alert(“PRO# not found!”); }
Tag: Suitescript2.0
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:
Remove the CORRESPONDING PO and ETA Column Values from Sales Orders.
REQUIREMENT Determine which sales orders are included in the corresponding PO and make sure thecommitted quantity equals the order quantity. If the condition is met, remove thecorresponding PO value and the estimated time of arrival (ETA) from the corresponding salesorder column. SOLUTION
Notify the purchase order’s quantity update by email
Requirement: Send an email to acknowledge the quantity update on the purchase order’s items. When a user or system modifies the number of products in a purchase order. Check that the PO is listed in the “corresponding PO” column of the sales order. If the purchase order is included in the “corresponding PO” column of… Continue reading Notify the purchase order’s quantity update by email
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
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.
Scheduling Email With HTML Content
Scenario: We can add HTML content in a Email Body and we can use basic operations like looping, if conditions, arithmetic and logical operations in this section. Here Pending Time sheets details are sending to corresponding project managers. The email body contains Time sheet link, and other details including its link to the corresponding time… Continue reading Scheduling Email With HTML Content