Anyone have an idea on how to have an Email Template in Salesforce which most Users "cannot see" but which they can use to send to clients? This would be done via a simple Custom Button:


The problem becomes that in the windows produced by this, they can simply click "Select Template" and it defaults to the Folder the template came from. I can't simply remove the Select Template button since that's needed for "all other" emails.


I decided to try something illogical (to me) and it worked(?!). I created a Test email template folder which was set to "This folder is hidden from all users". I put a copy of the template there. I pointed my custom button at that copy of the template.

Not only did it allow the email template to be used by an average user, but when they click "Select Template", it does NOT show them that folder (as would be expected).

Does anyone know of any side effects I would be inheriting by doing this? This seems to be the exact solution I need - it just didn't make sense until I actually tried it (that you can use a template, if you know it's SFID, regardless of what folder it is in/permissions on that folder).

  • For the sake of saying it, I don't even see where I COULD remove the Select Template button if I wanted to (I was thinking about an alternate page layout, but apparently you do not have the option to have custom page layouts for that page). – AMM Apr 30 '13 at 14:08
  1. If you have power users that are determined enough they might still be able to navigate to the template by shortening the URL from




    (no idea if it'd give them "insufficient privileges").

  2. The behaviour described in your "Update 1" sounds to me like some kind of security flaw that SF might decide to fix in future. I'm not sure I'd count on something like this in a production-ready functionality. Maybe simply raise a Case with support whether it's intended behaviour?

  3. If it's acceptable to just fire the email as is (without user being able to preview & modify the body) maybe you can experiment with adding &save=1 to the URL. Still - a determined user might inspect the source of the button and learn the template id.

  4. You could also consider a "do it yourself" solution with a bit of Apex? Both single and mass email objects have setTemplateid() method you could use. You can query the EmailTemplate object for IDs.

  • #1 totally understood. #2 is a good point - am going to consult SF but USE it short term... #3 no, they'll be customizing slightly per-send... #4 ugh. My ongoing crashcourse in Apex is frustrating enough. Logical idea generally for control/versatility, but not interested right now. :-) Thanks... – AMM Apr 30 '13 at 18:19
  • If it's supposed to let them edit the email a bit before sending - #4 becomes so tricky it's not worth doing (the act of merging fields is something magical that happens during sending (out of the box we can't tell it to make field merge, then replace this bit with that user-supplied bit). Sorry, I don't see an easy way to reuse the email sending UI but essentially not let them see the email template/use it from outside of your button... Some field on the record for "Personal_Message_In_Email__c", merge field in template and &save=1 ;) – eyescream Apr 30 '13 at 18:47
  • @AMM I second the suggestion to raise a case. They may be able to tell you whether this behavior is a known issue or working as designed. Safe harbor: you're definitely going to want to double check that it still works, when Winter 14 is available in sandboxes. – Carolyn Grabill Jul 29 '13 at 19:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.