send email to user in a reference field from a Catalog Item

Peter Williams
Kilo Sage

Good Day everyone.

 

I am trying to figure out how to email a user that is filled into a reference field on a catalog item form.

Basically, i have an expense form and on the form i have a reference field called Approver.

The request once submitted should email the Approver to approve the expense request.

I am not able to figure out how to do this in the Notification or email script.

or how do you program event parm 1 to pass the information into it

 

any help is appricated 

 

1 ACCEPTED SOLUTION

i was able to figure it out 

 

(function() {
// return the value to use for Parameter 1
return current.variables.approbateur_approver;
}());

 

PeterWilliams_0-1686152011819.png

 

thank you all for the input

 

View solution in original post

4 REPLIES 4

Ankur Bawiskar
Tera Patron
Tera Patron

@Peter Williams 

you can use eventQueue based approach via business rule

So once REQ is created are you creating an expense record? you can use workflow run script and pass that field value in event parm1

Can you share some details around the form, screenshots etc

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

sure here is what the expense form looks like:

the Reference field Approver

PeterWilliams_0-1686149980431.png

 

is what i need to send the email to once the item is submitted.

 

PeterWilliams_1-1686150014242.png

 

i need to pass that approver email to the notification

PeterWilliams_2-1686150053265.png

 

 

but i am not sure on how to do it for the catalog item REQ

 

Hi @Peter Williams 

 

Please refer below video for steps to create a notification in workflow

Sending email Notification In a workflow 

i was able to figure it out 

 

(function() {
// return the value to use for Parameter 1
return current.variables.approbateur_approver;
}());

 

PeterWilliams_0-1686152011819.png

 

thank you all for the input