Bypass the Need for Coding with the Process BuilderupsourceIT
Apex code has made certain functionalities of Salesforce off limits for the non-developer, until now. With Process Builder, more complex automation is supported without writing any code. It can be tough if you don’t have any experience with coding to keep up with demands when it comes to Salesforce. Alternatively, if you have some experience in coding, but struggle as Google the right way to code something and then spend even longer Googling the proper fixes for bugs.
One of the most commonly requested actions that have only been available with code until now, is cross-object workflow. This is where you want an edit or creation of one type of record (say an opportunity), to trigger an update to another object (like the opportunity’s account). With Process Builder, we can do this without writing a single line of code! Later in this post, we walk through this example and see how it works. But first, here is how processes are created.
- Go to Setup and search for “Process Builder”.
- You then create a new process and add a Name and Description.
- From there you select the object that is triggering your process and whether it starts on update.
- Next, add criteria to determine what properties must be met, in order to fire each action. choose which field(s) are checked on, and you can go several layers down on the different objects. In a workflow, there is no ability to have conditional (if/then) logic, which is another great advantage to using Process Builder!
- Finally, pick the action(s) you want the process to perform.
Under the conditions that you just set you can either perform actions immediately, or schedule actions for later. You have a good selection of actions that can be performed, including executing Apex, creating/updating records and even posting to Chatter. The scheduling can be set to be before a scheduled action, or after an action occurs. Several criteria and actions can be added with ease as every time you create an action, it will give you the option to add another one.
Once you are done, if you are ready, you could activate the process that you have created. Even though there is no code involved you could still have some bugs so as per usual, it is a good idea to test it before releasing it on your main instance of Salesforce.
The process builder can do everything that workflows can do except for using point and click to send outbound messages. Eventually, process builder will replace workflows, but for right now workflows are still available. Salesforce recommends using the process builder, though.
As an example for use, let’s say that you need the customer type on an account to update when the opportunity status is updated to Closed Won. You would normally have to do that in Apex, as simple workflows cannot do it.
First, create the process and give it a relevant name.
Then choose the opportunity object, and you will want it to start when a record is created or edited.
Then you will set the conditions to fire – when the Opportunity Status equals “Closed Won” and the Account Type is not equal to “Customer – Direct”.
You will then have it update the Account type to Customer.
See how easy it was to do something that used to be impossible with workflows. Accessibility is an important part of any application and this is a huge step forward for Salesforce in that regard. If you have any questions, feel free to email me at firstname.lastname@example.org.