An inline Visualforce page allows us to embed a Visualforce page to standard page layouts. A Visualforce page would be available for embedding in the standard page layouts provided page is using the standard controller of that particular object. You can auto launch a flow without user interaction, using the following methods
- Process Builder
- The Apex start() method
- Invoke a Flow from the Force.com REST API
- Inline Visualforce page
The Process Builder has its own set of limitations, for example, it is not available for all objects. One real use case from Success Community and credit goes to Kristine Curington
This article will help you to understand, how you can auto launch a Flow from Inline Visualforce page. Another use case, triggers a Flow as soon as Contact Role is added to an opportunity. Let’s start with a business use case
Business Use case
John Hickey is working as System administrator at Universal Container. He has received a requirement to auto add the user to a Public Group if Permission Set Lightning Experience is assigned to them.
Solution of above business requirement
Before going ahead with the solution, you have to understand PermissionSetAssignment Object. It represents the association between a User and a Permission Set. Below are the key fields from PermissionSetAssignment object
||ID of the PermissionSet to assign to the user specified in AssigneeId.
||ID of the User to assign the permission set specified in PermissionSetId.
GroupMember represents a User or Group that is a member of a public group.
There are few alternatives (Using Apex or Force.com REST API) for the above business scenario, but we will use the Flow and Inline Visualforce page to solve this. Follow the below instructions to create a Flow and Visualforce page for the above business requirement
Read the rest of this entry!