The Zurich release has arrived! Interested in new features and functionalities? Click here for more

email script

abhisek
Tera Contributor

I have a select box variable for example 'partner' in my catalog item, which is user details as question choices(text is the name and value is the email id).

I have to send notification to the partner field value which was selected during raising the request. For example partner field value is 'ABC'(email is 'abc@exmpl.com') along with the email body.

How can I implement this using email script and notification?

 

Can anyone please help me out, it is very urgent.

 

12 REPLIES 12

Dom Gattuso
Mega Sage

@abhisek  - You should be able to access the value with current.variables.product.toString() within an email script. 

Hi @Dom Gattuso 

Thanks for your reply.

The 'partner' variable in my catalog item is not a reference field to user table so Can we send notification to the user whom was selected during raising request ?

I don't think the description is clear enough.
"(text is the name and value is the email id)"
So you have choices that have a label (ABC) and a value ("abc@exmpl.com")?
In that case you should be able to use current.variables.partner.toString() to get the value (abc@exmpl.com) of the field.

So you should be able to something like:
gs.eventQueue('email.partner', current, current.variables.partner.toString(), '');
This expects that you've created an event called email.partner.
Then in your email notification you'd trigger the notification from event email.partner and make the recipient event parm 1.

abhisek
Tera Contributor

Hi @Weird 

Thanks for your reply.

You are correct.

That select box variable 'partner' has 26 choice values for the catalog item 'abc'.

When request is raised for that 'abc' catalog item whom we select as a value for that 'partner' variable that user must receive the notification (subject : your request is created, and it should populate the request number). 1 particular user an 1 particular group also must receive the notification along with the user we had selected for that 'partner' variable value.