REQUIREMENT Need to add a HTML table to display the sublist details in view mode of record. SOLUTION Following is the code snippet to add the HTML table in the custom record under a custom tab. This is to be added in beforeload of user event script.
Tag: UserEvent script
Adjusting the Tax Amount on the Invoice Item line
REQUIREMENT Client would like to develop a script that should adjust the Tax Amount on the Invoice Item line if the Gross amount is within 0.01 of a whole integer. So, this adjustment will round the Gross Amount to the nearest whole integer such that 19.99 ≈> 20 <≈ 20.01 Need to implement a script on the save… Continue reading Adjusting the Tax Amount on the Invoice Item line
Script for setting up the preferred vendor in the item price based on the lowest purchase price.
The preferred vendor is set based on lowest purchase price using a user event script.
User Event Script to update JSON file for Custom Commerce Categories : (SuiteCommerce MyAccount) SCMA
Scenario: We need to create a JSON file of custom categories that need to be displayed on the website, it is Suite Commerce MyAccount so there is no default feature for Commerce categories, so we have created a custom record for the same, and In this script we are creating a JSON file for storing… Continue reading User Event Script to update JSON file for Custom Commerce Categories : (SuiteCommerce MyAccount) SCMA
Script to send an automated email once the customer submits the return online
Requirement Set up an automated email system to send customers a confirmation email once they submit a return request online. This email will provide important information about the return process, including details about the Return Merchandise Authorization (RMA) and the return label. Create an automated email once the customer submits the return online of what… Continue reading Script to send an automated email once the customer submits the return online
Restricting the sales order creation based on the checkbox field in the customer record
Description Upon saving the sales order record, the script will verify whether the customer’s checkbox named “Disallow Create Order” is checked. If the checkbox is found to be checked, it will restrict the update or creation of the sales order each time on its save.
Make a copy scenario
To disable a checkbox in edit context if it was checked initially during the record creation.
The checkbox was checked during the record creation, and when record is edited then it should be disabled. In User Event Script, beforeLoad(scriptContext) entry point is used. It has scriptContext.form as a parameter.
Make a copy of vendor or customer records using user event script.
To make a copy of vendor or customer records, the create context type can be used instead of copy context type in the user event script. In the user event script, beforeSubmit(scriptContext) entry point is selected. It is because in the view mode of the record, “Make a copy” option is not available in the… Continue reading Make a copy of vendor or customer records using user event script.
Set the location in item level of sales order
To set location in item level of Sales order with the body level location field value , if there is no line level sales order location. We can use UserEvent Script