function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
JustinWheatleyJustinWheatley 

Email Alerts

Hi,

 

Could anyone please tell me how to create an email alert if a lookup field is changed?

 

This is probably a simple one for you guys out there?

 

Thanks again,

Justin

Best Answer chosen by Admin (Salesforce Developers) 
SporterSporter

Ah a lookup field, what you need here is a formula field on the object the workflow rule is running on which pulls in the information from the lookup filed object Node__r.Name field and then base your ISCHANGED() function on this formula field.

 

Workflows only trigger when the object they are created on is changed/created/edited.

All Answers

SporterSporter

You'll need a workflow rule with an Email update to do this (Professional edition can get it enabeld by Salesforce Account Executive, Enterprise, Unlimited and Developer have it as standard).

 

The workflow rule will give you criteria that you can choose however what you will need is a formula (availabel in the drop down box where it says criteria to evaluate).

 

Formula would be

 

ISCHANGED(expression)

 

Then you add the Email update which can email the owner of a record (a few other others based on the type of record also) or a set list of emails/users.

 

JustinWheatleyJustinWheatley

HI,

 

Thanks for your reply. This was the formula I was using, but I keep getting an error as the filed I would like the email alert to run on (if changed) is a lookup value?

 

The error I receive is: Error: The ISCHANGED function cannot reference the Node__r.Name field.

 

The Node filed is a lookup field we have added to the accounts page.

 

I am stumped???

SporterSporter

Ah a lookup field, what you need here is a formula field on the object the workflow rule is running on which pulls in the information from the lookup filed object Node__r.Name field and then base your ISCHANGED() function on this formula field.

 

Workflows only trigger when the object they are created on is changed/created/edited.

This was selected as the best answer
JustinWheatleyJustinWheatley

Many thanks!

 

Sorry to ask, but you may be able to help with my next conundrum?

 

I have created an object called 'Day Data' where I upload figures on a daily basis, one of these being ' Busy Day Peak Agents Logged In'. In the accounts page there is a text field I have created called 'Agents' where we enter the number of Agents our customers have paid for.

 

I would like to create a workflow rule and email alert to alert when the "Busy Day Peak Agents Logged in" exceeds the figure in the "Agents" field.

 

When creating the workflow I can choose the field "Busy Day Peak Agents Logged in" and Operator "Greater Than", but the next column wants a Value! Is there a way I can choose the Field "Agent" at this point?

 

Thanks again for taking the time to help.

 

Regards,

Justin

 

 

SporterSporter

Again what you would need is to change it all to a formula evaluation so something along the lines of:

 

 

Busy_Day_Peak_Agents_Logged_in__c > Account.Agents__c 

 

You say Agents is a text field? You will need to either change this to a number of use a function to convert it to a number.

 

JustinWheatleyJustinWheatley

Perfect! Thank you SO much!!