How to set the value of Custom Form before loading a new transaction record?

“Data can be manipulated for records created in beforeLoad user events.” This is from the following help pages:

SS2: /app/help/

SS1: /app/help/

But the following line has no effect:

context.newRecord.setValue('customform', '257');

A logging line immediately before this one is recorded properly so I am confident that the line is executed..
Rookie Asked on July 15, 2020 in SuiteScript.
Add Comment
1 Answer(s)

I don’t think you can change the form via User Event as it requires a redirect but here’s a solution:

Intermediate Answered on July 15, 2020.

Thanks but surely redirect.toRecord must work only for the UI. I can use client scripting for the UI. I need this to work when records are created by another script.

on July 15, 2020.

If the script that called it was a UE script it’s not going to work. A UE will not call another UE


ex. On customer before submit, I created an opp record that has a UE. That opp record UE will not run

on July 15, 2020.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.
  • This site made possible by our sponsors:   Tipalti   Celigo   Limebox   Become a Sponsor   Become a Sponsor