I'm running a User Event script with a before submit trigger on a Work Order. I am grabbing some info from one of the items in the sublist and then populating a few custom body fields. In particular, I'm populating a custom field of type integer.
When I run the script through the UI everything works as expected. However, if i perform an nlapiSubmitField from the console, I get the error:
INVALID_FLD_VALUE - You have entered and Invalid Field Value 1000.0 for the following field: custbody_quantity
I have tried everything I can think of to try and get the thing to submit properly. I've tried:
[LIST]
[*]using parseInt on my original value
[*]using toString on my original value
[*]using format.format({ value: myValue, type: format.Type.INTEGER })
[*]using a hard-coded integer value
[/LIST] And everything fails - but ONLY from the console.
I even tried running the script through the Script Debugger. If I trigger it through the UI it walks through the script and executes properly. If I trigger it via the console, the debugger crashes my browser without ever showing a line of code.
Also, I thought that when you issued this type of command from the console the event type was XEDIT. However, the first line of my beforeSubmit trigger is an execution log that is reporting the event type as EDIT.
I'm looking to you, oh wise keepers of the SS2.0 faith. Bestow your genius upon me!