+ Start a Discussion
jmalcodrayjmalcodray 

Notify Account Owner of change

I'm sure this is easy to do but couldn't find what I needed in my searches.  Looking to trigger an e-mail to the Account Owner when someone else does one of the following:  updates the account record, updates or add a contact record, or adds an opportunity record.  should be easy -- hoping you can share the code or point me to a similar thread where I can start.

 

Thank you,

Joe Alcodray

Best Answer chosen by Admin (Salesforce Developers) 
sales4cesales4ce

Workflows should help you with what you are looking for.

 

Workflow evaluation rule would be "whenever a Record is edited" send an email alert to record owner.

You need to identify the rule criteria, like a specific field being changed or updated.

 

Have a custom field called "No of contacts". this would of type Roll-Up.

whenever a new contact is added to the account, it would update this field. so you can then use "Ischanged(No of Contacts)" and then as your rule criteria.

 

I hope this helps.

 

Sales4ce

All Answers

sales4cesales4ce

Workflows should help you with what you are looking for.

 

Workflow evaluation rule would be "whenever a Record is edited" send an email alert to record owner.

You need to identify the rule criteria, like a specific field being changed or updated.

 

Have a custom field called "No of contacts". this would of type Roll-Up.

whenever a new contact is added to the account, it would update this field. so you can then use "Ischanged(No of Contacts)" and then as your rule criteria.

 

I hope this helps.

 

Sales4ce

This was selected as the best answer
jmalcodrayjmalcodray

Thanks for the tip on how to approach this.  I get the workflow to check for when a recorde has been edited.  But not getting the roll-up type field for when a new contact is added.  This really shouldn't happen at all anyway (it did once or twice) so I'd hate to build a rule for the exception, if that makes sense.  We do get several account execs though that make changes from time to time that the 'owner' isn't aware of and that's what I'm hoping to address.

 

Feel free to send along any code samples that might be helpful, it is all greatly appreciated.

 

Joe

Prashant.SakhujaPrashant.Sakhuja

 jmalcodray

You are right that you will not be able to create rolloup of contacts on account.

However you can create a rollup on account for opportunities.

 

Here is what you can do to implement you requirements without using any rollups or apex:

1) Create an email template that you want to sent out for notification. Include the account, contact and opp merge fields.


2) Create a workflow on Account object where 'Evaluate rule' is set as 'Every time a record is created or edited' and formula value as 1=1. (unless you want to trigger only on certain field changes)

 

3) Create second workflow on contact and 'Evaluate rule' is set as ' Only when a record is created' and formula value as 1=1.

 

4) Create third workflow on opportunity and 'Evaluate rule' is set as ' Only when a record is created'and formula value as 1=1.

 

5) Create an email alert for each of above 3 workflows and add Account Owner as a recepient for the email alert. This email alert uses the email template created in Step 1

 

6) Activate all the workflows and test them out.

 

Whenever an account is edited or a contact/opp is added, the account owner will ger the email.

 

Hope this helps!