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
Priyakaran1320Priyakaran1320 

Apex logic

Hey guys I need ur hel. I m unable to find a logic for code my situation are I have two fields  and wen theTwo particular fields are changed or updates I should have set a trigger that automatically fire a email to the user . Please any one can help me 

Saikishore Reddy AengareddySaikishore Reddy Aengareddy

Try using workflow email alerts.

sourav046sourav046

Make your requirement clear .

 

You want to send an email when any one of the fields is changed or both the fields are changed ?

 

One more thing is it manadatory for you to use trigger ?we can do it very simply by Workflow rules .

So why complicate ?

TrinayTrinay

Hi Priyakaran 1320,

 

   Insteed of trigger, the Workflow Email Alert was good one for this.  

 

1. Create new workflow rule and choose any one of the Evaluation Criteria based on your Requirements.

 

2. Then write the following rule criteria:

       choose formula evaluates to true:

                                        ex : ISCHANGED(field1) & ISCHANGED( field2)

 

3.Choose Workflow action as Email Alert.

 

I hope this will helpful for you