Visual Workflow allows us to automate business processes by building applications, known as Flows. Using Flows, a user can collect information; or, they can update, edit, or create records in Salesforce. Furthermore, Flowscan execute logic, interact with the Salesforce database, call Apex classes, Platform Events, and guide users through various screens to streamline the process of collecting and updating data. Once a Flow is built, an Admin can make the Flow available to the right users or systems.
Visual Workflow is similar to the Visualforce page for admin – for, by using Visual Workflow, an Admin one can create a powerful wizard for data entry or display a message without writing a single line of code!
There may be times when an Admin wishes that s/he could add a Lookup field to Flow Screen Element. But, as we all know, unfortunately, Visual Workflow doesn’t support Lookup field. As a result, whenever an Admin needs to use a Lookup field, s/he has to useDynamic Record Choice.
For example, suppose you want to use lookup functionality to display Chatter Group – based on matching result – to users based on their input. If so then, you can do so using the following Elements:
Two Screen elements
One Textbox field
One Dropdown List field
Dynamic Record Choice
Check out this video for detailed instructions:
Screenshot for your reference (transcript of video):
Chatter Group is one of the best ways to boost collaboration in your organization. A Chatter group represents a group of users – one can add unlimited members to a Chatter Group but, a user can join a maximum of 300groups; and, your company can have a total of 30,000 groups. Chatter groups can be public, private, unlisted, or archived.
In the aforementioned article, I have discussed few advanced concepts that will help you to automate Chatter Group membership. If you didn’t get a chance to read it yet, do it now! It will significantly improve your knowledge of Process Builder and automation around Chatter.
Below are few tasks, related to Chatter groups, that can be automated to enhance productivity.
Whenever a group is created, auto update the Group Type to Private
Criteria based auto-archiving – Archive this group if there are no posts or comments for 90 days.
Send email notification to group owner or managers when Chatter group doesn’t have a description.
And, last but not least, auto add all System Administrators to a new Chatter Group
Until now, it was necessary to write Apex code to manage the aforementioned tasks. SinceSpring’18 release, however, it is now possible to manage these tasks with the help of Flow and Process Builder. Let us see how to get started on working smarter by tackling a business use case.
Business Use Case
Edward Backhouse is working as a System Administrator at Gurukul on Cloud (GoC). At GoC they use Chatter extensively to collaborate internally. Edward received the following requirement from upper management:
Whenever a Chatter Group is created, automatically add system administrators to the group.
Yes, yes, I know! Adding System Administrators to a new Chatter Group is just one of the Chatter automations listed above!But, what fun is it in being spoon feed? Why not harness your newly acquired knowledge – of Process Builder and Flow – and try your hands on the other aforementioned scenarios?
What do you have to lose by accepting the challenge? Why worry when you know that I am just a click away? If, despite trying, you find yourself getting stuck then, just drop me a line! Go ahead, master the material by flying solo on the other scenarios!
A solution for the above business requirement
Ok, now let us get back to creating a solution for the problem at hand – whenever a Chatter Group is created, automatically add system administrators to the group.
There are a few possible solutions for the above business scenario, but we’ll use Flow and Process Builderto solve the above business requirement. Before trying to understand the technical aspect of the solution, let us spend some time to understand the general flow at a high level. Please spend few minutes to go through the following flow diagram and understand it.