RE: In SS2.x, can you set a field value in beforeLoad of a User Event script?



So in a User Event script in the beforeLoad function I need to set a custom Transaction Body Field value, like this:

var newRecord = context.newRecord;


fieldId: 'custbody_my_custom_field',

value: true // or false


Logging the result of the above, I can see the value change, but it does not persist through the entire page load, and always returns to the default state. I have ‘Store Value’ checked on the field’s setup. So, is it just not possible to set a field value in beforeLoad and have that value persist?


Thanks for any help!!


mreser Rookie Asked on September 16, 2019 in SuiteScript.
Add Comment
4 Answers

Leacc, thanks! Yes, I did so in a newly created record, didn’t try on EDIT. Mreser, you might want to try with a workflow instead.

Beginner Answered on September 16, 2019.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.