Need to add requestor in CC field in email

Moutushi Ghosh
Tera Contributor

Hi Everyone,

I have built one catalog item. In this there is a field called "Requestor". Now I have a requirement. I need to tag this requestor field with the CC field in email. Whoever name is showing in requestor they should get the email (as cc) once I have submitted the request. I have already written the script, however it is not fetching the requestor details in CC field.

Attaching some screenshots.

 

4 REPLIES 4

Mike_R
Kilo Patron
Kilo Patron

Is there a reason why this line is commented out

Mike_R_0-1666274174324.png

 

this should do the trick

 

email.addAddress("cc", current.variables.requestor.email);

 

 

Also make sure you include the mail script in your notification

palanikumar
Mega Sage

Hi,

In email script image you need to uncomment line 5 where user variable is declared.

This will work only if  requestor is reference variable. Convert this  variable as reference if it is not already

 

Thank you,

Palani

Thank you,
Palani

Saurav11
Kilo Patron
Kilo Patron

Hello,

 

Please us the below:-

 

email.addAddress("cc", current.variables.requestor.email,current.variables.requestor.name);

 

And then call the mailscript in the Body HTML of the notification as below:-

 

${mail_script:TCSAddCC}

 

Please mark mu answer as correct based on Impact.