Trying to script an approval on a record producer that creates an HR Case.

lydia3
Kilo Contributor

I have a record producer pulling in the manager that I need to approve the request in the Workflow, but trying to get it to work in the approval process has been unsuccessful.  

The record producer is called FromSupervisor, I also have the field populating into the HR_Case in a newly added field Record_Producer_3.

I assumed that I needed to push that field over in the Approval Script on the Workflow, but it continues to skip over the approvals (not referencing anyone)

answer.push(FromSupervisor)

Any guidance would be most appreciated.

1 ACCEPTED SOLUTION

Getting closer!   Now that you have a field u_approver that is a reference, it is expecting a sys_id of a user record.   In your script above you are setting it to the Display Value of the FromSupervisor.   This should get your squared away:


current.u_approver = producer.FromSupervisor; - this is assuming FromSupervisor is a reference variable for the sys_user table.


View solution in original post

15 REPLIES 15

You are very welcome.   Glad that worked.   Have a great weekend.