Got an "oh I wish I didn't need to solve this one" thing with a Suitelet. This tool allows us to put in percentage increases and decreases around item cost categories and then calculates a 'what if' scenario. Like "What if UPS raises their rates 5%?" and it spits out a before/after.
The problem is one of the categories is Tariff increases/decreases.
this is fine fireThe system is erroring out because the percentage value is not between 0 and 100. When you have a new 145% tariff on top of the previous 25% (170% was not on my bingo card), you have a 580% increase.
What do I change in the script to handle percentage changes outside the 0-100 range? There doesn't appear to be a MIN/MAX tag I can use.
var tariffRateChange = form.addField({
id: 'custpage_tariffratechange',
type: serverWidget.FieldType.FLOAT,
label: 'Tariff Rate % Change',
container: 'landedcostgroup'
});
I can't find anything in notes/posts, and the AI world is (so far poorly) suggesting a client script to validate (which may be the right direction, but the examples to date aren't directly relevant/useable.)