in a `beforeSubmit` User Event script, is there a ...
# suitescript
r
in a
beforeSubmit
User Event script, is there a way to make
context.newRecord
to be in dynamic mode? Trying to resolve an issue and was about to check if using dynamic mode will fix it. I tried moving the script to
afterSubmit
but the issue was not resolved.
l
On after submit, you can reload the record in dynamic mode...
e
Perhaps better to describe the issue
👍 1
r
Script is adding a Discount Item where the discount amount is calculated based on a custom record. The discount amount is taken from the Rate of the line above it multiplied by the Discount percent taken from the custom record. The calculated amount is put in the Rate column of the Discount line, then multiplied by the Quantity of the live above. This value t is placed in the Amount column of the Discount line. But when the record is saved, the Amount value is the same as the Rate for the Discount line. The log shows that the Amount for the Discount line should be different.
l
Did you change price level of discount line to Custom?
r
Yes
b
share the code
and potentially the setup of your discount item
especially if there are any promotions involved