I have a UE script that used to attach a message to a specific record. I would set the 'rectype' field to the type of record and the 'record' field to the ID of the record to attach to.
I have had the script 'turned off' for awhile and today, when I tried to bring it back online all kinds of things started acting funny.
If I try to set 'rectype' to 'customer' I get this error:
You entered "customer" into a field where a numeric value was expected. Please go back and change this value to a number.
If I set it to '27' (as defined in the WSDL) I get this VERY STRANGE error:Items you have requested in the record have been deleted since you retrieved the form
Here is the script: function OnBeforeSubmit(type) { messageRecord = nlapiGetNewRecord(); try { log('About to call ProcessCommandStatement()'); messageRecord.setFieldValue('rectype', '27'); messageRecord.setFieldValue('record', '991'); log('Finished calling ProcessCommandStatement()'); return true; } catch(error) { nlapiLogExecution('DEBUG', 'Exception', 'some error test'); logException(error); return true; } } Note that I'm running that code ina try/catch block. Why isn't an exception being thrown?????? My catch block is never being called, the error just bubbles up to the UI (or SOAP response where I originally noticed it)I feel like I'm losing my mind, I can't think why this used to work and now does not. I haven't been upgraded to the latest version yet, so it's not that (or it shouldn't be that).Anyone have any ideas? What in the word is that second error all about??Items you have requested in the record have been deleted since you retrieved the form