This script is designed to handle item pricing updates based on specific conditions for a NetSuite record.
- Price Calculation: Calculates the price value based on an item's online price and an upmark percentage.
- Before Submit Handling: Manages changes to the item record during the
beforeSubmit
event.
- NetSuite API Version: 2.1
- Script Type: User Event Script
- Name: Hunter Jacobs
- Affiliation: Elcometer Inc.
N/record
N/log
When an item record is submitted, the script:
- Fetches the online price and upmark percentage.
- Checks if the item is marked for Amazon.
- Calculates the new price based on the upmark percentage.
- Updates the item's Amazon price if necessary.
The script logs errors in two scenarios:
- If the price sublist line is not found.
- If there is a general error during the
beforeSubmit
event handling.
You can copy and paste this directly into a README.md
file in your GitHub repository for the script. Adjustments can be made as necessary.