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
Paul HunterPaul Hunter 

Email Templates not visible to Customer Community Users shortly after Spring '19 Update

About a week after the Spring '19 rollout, we've suddenly ran into an issue around Email Template visibilty for Customer Community Users. 

TLDR; Email Templates are not visible to Customer Community licensed Users, regardless of the access settings on the Folder under which the template resides. 

Our specific configuration is as follows - keep in mind that the custom implementations mentioned have been in place since 2015, and have not been changed in the last year if not more. 

We have a Visual Force + Tabs community that serves as a Customer Support portal

We have setup an Apex 'After Insert' Trigger on the Reply SObject to send notification emails to the original poster and those subscribed to the category/area the question was posted, of a new response to the question. 

The Trigger calls a Future Method with Callouts method on a 'With Sharing' APEX Class that compiles the needed User collection to notify, before calling an Email Helper class to send the notification emails. 

The Email Helper method which sends the notification emails does so via an Email Template (html) - the email template used is hard coded, and is within a folder accessible to the public. 

The Email Helper fails with a SOQL Exception 'List has no rows for assignment to SObject' on the following query used to retrieve the Email Template

    EmailTEmpalte template = [Select id, body, Name from EmailTemplate where Name = :templateName limit 1];    

I understand the nature of the SOQL Error, and have verified that only a single record exists that fulfills the condition. 

To further test, I wrote a Test Method which creates users of all the Profiles we have in our Org Currently, and runs a simple 'Select All' query on Email Templates to quickly see if Email Templates are visible at all to the Community User profiles. 

This test method revealed that ANY of our Customer Community licensed profiles are not able to see ANY of our email templates, regardless of the folder's access settings. Any of the Salesforce User Licensed profiles can see the template. 

After all my investigation so far, this is really starting to smell like a Platform issue, perhaps something rolled out with Spring '19 or shortly there after. 

Salesforce Support confirmed this morning that its unexpected that the templates are not visible in their current configuration.

Any help on this is greatly appreciated; thanks in advance.

--Paul

 
Paul HunterPaul Hunter
For additional detail, this problem began on the 20th of February, putting it 12 days after the Spring 19 rollout, and our affected instance is hosted on NA53. We still have not been able to discover the source of this problem within our org, and are almost certain this is a platform issue. 
Tony White (BNE)Tony White (BNE)
FYI Just had this happen to us, I was lucky enough to find the cause to be an option that an Admin enabled the yesterday
https://help.salesforce.com/articleView?id=email_templates_enable_enhanced_folders_sharing.htm&type=5

With that enabled community users are uanble to access classic email templates, disable that and they can.
William FrazierWilliam Frazier
That does not work for me. External users cannot see templates, the icon is not even there. Support says to enable folders but that option is not on the profile. Support researched and said to add it via API, which I have no idea how to do and they could not since it was developeent and we don't have Premier support. As a non-profilt, we can't. Any ideas? 
William FrazierWilliam Frazier
Same here, rolled out a volunteer manager portal and now none of my community managers can access templates to send messages. This is REALLY bad. Support spent 3 weeks looking and only said to load the permission by API--as if I knew how. 
Ankit Sharma 277Ankit Sharma 277
Hi Paul,

You need to make the classic email template folder visible to All users by using the below steps:

Go to setup > Classic Email Templates > Edit the Template Folder and select "This folder is accessible by all users" option

User-added image


After selecting this option this error will not occur as all the users can view the templates now.


Thanks 
Ankit Sharma