The best thing about the process builder is that it empowers admins to do so much more with just simple point-and-click interface. You can now create processes that have hitherto required triggers and code. Let’s say that you would like to create a new record to a child object whenever you create a new account.
The Process Builder user interface is like a fairly simple flow chart. You can do very advanced processes with it but for the sake of simplicity, let’s just make something that does a limited and simple task: create a record under a child object whenever an account is created:
The first dark blue account box defines when the Process starts. Here we specify that the process starts only when the Account is created:
In the lighter blue box we can specify certain criteria on how the process will go on. We could add some criteria by either selecting some conditions from picklists or creating a formula that returns a true/false value. But since our only need is to create the new record we can just make the system execute the actions! No more 1=1 formulas to make something run every time. :)
So far we have established that whenever an account is created, we want some action to take place. After clicking the Add action -button on the Immediate actions, we get to define what we want to create. In this example we have an object called Total Demand & Sales Target that we want to add.
It is fairly straightforward and only thing we really need to specify is that the Account field is populated with the Account ID whenever the new record is created. That way they will be linked to the account that was just created and therefore visible in the related list under the Account.
Now, like with all workflows and processes we just need to activate the process and we are done!
No triggers or developer involvement required!
A word of warning though
The process builder is not bulkified so this process only really works when an user is manually entering the account in to the system. If you are doing an import with data loader (or you have some custom code that creates accounts) or generally whenever you start the process flow by updating multiple objects at the same time, this method will not work properly. It’s a current known limitation but you can speed up the development by voting for this idea on IdeaExchange.
Have you created an useful Process with the Process builder or managed to do something you were previously unable to do? If so, drop me a line because I would love to hear about it in the comment section!




No comments:
Post a Comment