Hiya friends. I'm trying to update a custom recor...
# suitescript
j
Hiya friends. I'm trying to update a custom record from within a 2.0 Client Script on another record type. The record type I'm trying to update (let's call it
myrecordtype
) has a Workflow that runs some Set Field Value actions After Field Edit. When I try to update my record with script, the Workflow seems to be throwing an error. Updating the record normally through the UI (or on the record in the console using SS1.0
nlapiSetFieldValue()
) doesn't throw any errors. Not sure where I am going wrong here. My code to update the record looks like this:
Copy code
var myrecord = record.load({type: 'customrecord_myrecordtype', id: 1637});
myrecord.setValue({fieldId: 'custrecord_myfieldname', value: 2});
myrecord.save();
``````