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
sandeep madhavsandeep madhav 

Email template Not found

Hi,

Iam Triggering an VF Template email alert by using workflow on "created, and any time it's edited to subsequently meet criteria".

But Unfortunitely Im getting below error.

 

System.DmlException: Insert failed. First exception on row 0; first error: TEMPLATE_NOT_FOUND, The record couldn't be saved because it triggered an email alert that failed. Please contact salesforce.com Customer Support

Any Idea??

EldonEldon
Hi sandeep,

Check if your referenced records are shared or not.Try turning all related objects referenced in the template to public read sharing. let me know if it is working then.

If you want to change the shqaring rules query the UserRecordAccess Object to determine if your community users had access to the records referenced in the templates which will help to narrow down the objects which weren't shared or didn't have read access for that community profile.


Regards
sandeep madhavsandeep madhav

HI Eldon,

We are just refering {!relatedto.id} in Vf template, Where the relatedto type object is case. Which is having public read access.