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
ShaTShaT 

Apex trigger causing lead auto-response rule to fail

Hi All,

I have an issue with an auto-response rule.The lead auto-response rule doesn't fire when a lead is created from webtolead. 
Upon disabling the trigger, the auto-response rule works Fine but  When enabled, the trigger works as expected but the auto-response doesn't get excuted.

I have used below code but still auto-response is not getting excuted. 
Database.DMLOptions dlo = new Database.DMLOptions();
dlo.EmailHeader.triggerAutoResponseEmail = true;

Please anybody can help on this.

Thanks
ShaT
Sonam_SFDCSonam_SFDC
Hi,

Have you tried testing the autoresponse by direct creation of Leads from the webtolead form? is that working?
Vinita_SFDCVinita_SFDC
Hello,

Can you check the debug logs for exact error. Setup|Administration setup|monitoring|debug logs