I was trying to prepare a consolidated (kind of laundry) list of different types of execution and if those are executed in System mode or User mode.
Help me to validate this and mention if I have missed.
- Trigger - User
- Validation Rule - System
- Auto Response Rule - System
- Assignment Rule - System
- Workflow Rule - System
- Escalation Rule - System
- All Types of calculation behind formula, Rollup Summary - System
- Process Builder - System
- Visual Workflow or flow - User
- if flow is called from Process Builder - System
- Approval Process - System
- Publisher Action - System
- InvocableMethod
- if this is called from flow - ?
- if this is called from Process Builder -? (does it depends on with or without sharing is specified on that Class)
- if this is called from REST API - ?
- Custom Button - System
- Test method with System.runAs() - User
- Test method without System.runAs() - System
- Visualforce Page (StandardController) - User
- Visualforce Page (StandardController with extension) - User
- Visualforce Page (Custom Controller)
- depends on with or without sharing of the controller
- Visualforce Component - depends on Visualforce page where it is used
- Macros - System
- Annonymous Apex (running from Developer Console) - User
- Email Service - User
- All types of Jobs - System
- Apex Webservices - depends on with sharing (no field-level permissions either way)
with sharing
(no field-level permissions either way)