0

A Scheduled Flow sends an email alert. The ID and Name fields show up in the email alert, but the other merge (custom) fields do not.

The email alert fired other means works as desired. The Automated Process. I assume it is a permissions issue for the automated process users profile...or the fields specifically.

But I can't seem to access the custom objects via the process outlined here Automated Process User Profile Permissions

So I made a permission set and granted the access that way...

/setup/layout/flsedit.jsp?id={autoproc_profile_id}&type={sObjectName}

I also tried to assign read to the custom object fields in the field level security for the automated process user... /setup/layout/flsdetail.jsp?id={autoproc_profile_id}&type={sObjectId}

but the merge fields for custom fields remain blank when the scheduled flow sends the email alert.

Update: The issue appears to only affect Visualforce. Using an HTML Template the merge fields are populated.

  • 1
    this is a known issue with Automated Process context user and VF Email; we had to use html/text emails for this use case – cropredy Oct 19 at 18:26
  • Thanks for your reply, if you have the known issue reference/want to answer. I'll mark you ask the answer. – Gabriel M Oct 20 at 20:31
1

Sadly, using VF emails do not work when merge fields are used and the context user is Automated Process.

Workarounds:

  1. Use text or HTML emails
  2. Use a VF email component with its own component controller; you'll need to grant explicit access to the component controller's Apex class to Automated Process user as this does not occur by default (see - Automated Process User Profile Permissions) - If you need a merge field in the subject line .. this won't help

Known Issues:

Related SFSE posts on same topic

| improve this answer | |
  • Thanks again :) – Gabriel M Oct 21 at 23:59

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.