0

I performed this test in my sandbox- There is an object called Object1. When you change a field on it, it triggers a workflow. Workflow sends out email alert. Email alert is using Visualforce Email templates that have merge fields upto several levels (all lookups)

{!relatedTo.Field1__r.Field2__r.Field3__r.Name}

Initially merge field was showing blank when the actual email went out.

I noticed that my user profile did not have FLS to Field2__c. When i provided read access to my profile for that field, merge field worked.

That begs a question - Don't workflows work in System mode where they should have access to all objects, all fields and all records?

Or is it becuase i edited the object1, which set off the workflow, it will work in my user context? If so, does time-based actions also fire under my user context?

1 Answer 1

4

Workflow Rules evaluate in System context. Field Updates also update in System context. Email Templates, however, honor the field security of the user, because otherwise users could render templates to see data they don't have access to. This is something you'll need to keep in mind when using email templates.

1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .