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
omateomate 

Problem firing email notification from workflow rule

I am having an issue with one of our workflow rules not firing an email notification when it should.  We use Pardot forms and have created a custom field for the form name that is updated in Saleforce everytime a Pardot form is submitted.  We use a workflow rule to check if the lead already exists in Salesforce and if it does we then send out a Lead Update notification to our sales reps.

The issue is that if a lead already exists in Salesforce but not in the Pardot database and then the same lead submits a Pardot form no email notification is fired.  If the lead already exists in both Pardot and Salesforce then the notification triggers correctly.  The rule we are currently using to trigger lead update notifications is below.  Both 'pi__last_activity__c' and 'Form_Name__c' are dependent on a Pardot form being submitted.

AND(
NOT(ISNEW()),
ISCHANGED( pi__last_activity__c ),
ISCHANGED(Form_Name__c)
)
Vinit_KumarVinit_Kumar
The issue here is this condition NOT(ISNEW()),this would return false ax the Lead already exists in the system.As you are using an AND operator all the condition should return true to Trigger the WF rule.

I would suggest change the WF like below.

OR(NOT(ISNEW()),AND
(ISCHANGED( pi__last_activity__c ),
ISCHANGED(Form_Name__c)))

If this helps,please mark it as best answer to help others.
omateomate
Thank you for your reponse.  Unfortuntately adding an OR statement into the code causes the other validation rules to be bypassed.  We need all three criteria listed to return true before the rule fires.  (The lead cannot be new in Salesforce, Pardot last activity must be updated and the form name must change on the record.)