4N335
4N335

Reputation: 251

why my record.setValue({}) is not setting value in afterSubmit event?

i am setting a field value in a free form text field in my afterSubmit event. Logs are showing the value but the field is not set. I tried by check and uncheck store-value checkbox, but no change.

My code:

    recNew.setValue({
      fieldId: 'custrecord_plc_sup_grade',
      value: 'test'
    })

Can anyone suggest me any better solution? i tried the same code on beforeLoad event and it was working

Upvotes: 0

Views: 1323

Answers (1)

Rusty Shackles
Rusty Shackles

Reputation: 2850

Are you saving the record after setting the field? Since this is an after submit script, you need to save the record for any changes to take effect.

Upvotes: 2

Related Questions