cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Sending an email to an employee when an employee is added to the sales team in opportunity

0 Kudos
410

Hello

Can we send an email to an employee when an employee is added to the sales team in opportunity?
Didn't find how to specify this condition in workflow.

Thank you.

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member226
Employee
Employee
0 Kudos

Hello,

There is no standard Out-of-the-box feature for this functionality but with a little bit of PDI logic this can be done in the following way:

1. Create an extension field 'ZEMAIL_EXT' in Opportunity BO at the root level to say if an email has to be triggered or not. This will be used for evaluating the workflow conditions.

2. Write down logic in Party-BeforeSave or Party-AfterModify event and evaluate if the party node has been modified or not (Using GetFromDB() in comparison with buffered instance). If modified then mark field from step 1 (i.e. ZEMAIL_EXT)as TRUE else FALSE.

3. Create another field ZPARTY_EMAIL for the opportunity Party node which will say if email for this party has been triggered or not.

4. Create a new enhancement implementation for ExitForGettingWorkflowRecipient which will identify all the relevant parties for which mail will be triggered. More details can be found HERE. Also with in this BADI you will mark the value the value of ZPARTY_EMAIL to TRUE or FALSE.

5. Finally create a new workflow rule with condition as ZEMAIL_EXT as TRUE. Mark the BADI implementation name under "Custom Recipient Determination" for email sending parties.

Ideally this should work but pls feel free to revert in case you have any issue.

BR