hey guys, I am trying to set a rate as a % while a...
# suitescript
m
hey guys, I am trying to set a rate as a % while adding a sublist item for a markup item on a Sales Order, but I am getting this error when doing so:
Copy code
Notice
 
You have entered an Invalid Field Value 7.00% for the following field: rate
a
Try 0.07
m
I tried it but it doesn't show up as a percentage 😕
message has been deleted
I also tried to do 0.07% and same error as the first
You have entered an Invalid Field Value 0.07% for the following field: rate
d
I thought rate was a currency field. Why are you trying to put percent here?
m
because you can on the UI
a
Have you tried loading the record in dynamic mode?
m
@Alan Fitch I am doing this on a user event (before submit)
a
Set it to 7.00% in the ui and get the value in the script. What does it return?
m
rate:"7.00%"
i can just calculate it, but i thought it'd be nice to use the %
since I am using a subtotal item as well
s
try setting it with the integer 7
actually, IIRC setText with the % sign should work.
The rate field is funky in this regard. Other true percent fields are also funky (asymmetrical). You set them with numbers but when retrieved they are strings with % suffix
m
@Shawn Talbert I was just trying that, but no luck
It shows "Please enter a value for amount"
I also tried the field "porate" but it doesn't calculate
b
dont make the common mistake of assuming setSublistValue and setSublistText use the same parameters