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
Kumar Singh 2Kumar Singh 2 

Help Wit Formula

Hi,
I'm creating a Workflow rule. My requirement is to send an email when the criteria and formula meet.
Whenever a new Lead is created and Lead Stage =Marketing Qualified or Lead owner is edited. It will trigger an email.

My Formula:AND( 
Text(Status)= 'Marketing Qualified', 
OR(isChanged(OwnerId), isChanged(Status), isChanged(Number_of_Form_Submissions__c), isNew()) 
)
Please any one help me on this.

Thanks
Vivek

Rajesh3699Rajesh3699
Hi Kumar,

See, ISCHANGED(Status) or any field does not work during the record creation, since you are giving the values for the field 1st time.

So, when ISNEW() is there ISCHANGED will give you false and hence AND condition will fail.

So, the below could help for your scenarion

ISNEW() && ISPICKVAL(Stage,'Marketing Qualified')

Since when the record is new ISCHANGED(OwnerId) will false always and hence no use of using this.
ISNew() will be true only during the record creaion and if some edits the records this workflow will not fire.

Hope this helps.

Thank You,
Rajesh Adiga P.



 
Kumar Singh 2Kumar Singh 2
Thanks Rajesh! My requirement is When I'll create Lead workflow will fire and send notification mail to Owner when Lead stage is MQ. It should fire when editing the owner also. Thanks Kumar Vivek
Rajesh3699Rajesh3699
Correct me if am not wrong,

1. Email should fire for Lead owner when a new lead is being created
2. Email should fire for Lead owner when the status is changed to MQ
3. Email should fire for updated Lead owner when the owner is changed 

...???



 
Kumar Singh 2Kumar Singh 2
Sorry for the confusion, 1. Email should fire when new lead is created with lead status=MQ. 2. Email should fire for updated Lead owner when the owner is changed.
Rajesh3699Rajesh3699
(ISNEW() &&  ISPICKVAL( Status ,'Marketing Qualified')) ||  ISCHANGED( OwnerId )

I believe you are using the STD Lead Status field with value 'Marketing Qualified.

Hope this helps for you.

Thank You,
Rajesh Adiga P.
Kumar Singh 2Kumar Singh 2
Rajesh, Code don't have any error, But nothing is fire when creating the new record or while changing the Owner.
Rajesh3699Rajesh3699
check when the workflow evaluation criteria also ensure the marketing qualified in the label of the picklist


User-added image
Kumar Singh 2Kumar Singh 2
Evaluation criteria is "Evaluate the rule when a record is created, and every time it's edited" and yes, MQ is available.