https://help.salesforce.com/servlet/servlet.FileDownload?file=015300000035wMDAAY
I can not explain Process Builder or Flows well enough. Just go to https://rakeshistom.wordpress.com/learning-process-builder/ to see all about it. |
Processes are just Flows behind the scenes - see Process Builder Behind the Scenes for how you can tell.
Lots of known issues https://success.salesforce.com/issues_index?tag=Process%20Builder
It is really hard to see exactly what the criteria are, and you have to click into the diamond to see it - BEWARE! mistakes are going to be made.
I had to really shorten the Criteria Name so it displays in the diamond in a readable fashion.
The 3 fields are actually filters on the Campaign - not that you can tell that.
I suggest you use Formulas instead - it is at least somewhat readable.
I want to enter values on the Contract that are stored on the Account. Default values from the account. One is the Primary Contact for that Account that the Contract is for - so that's a lookup value. Lookup values can now be set by Process Builder - Yay! So it should be easy, right? Wrong. The other defaults are picklist values - eg Contract Type and Contract Process I only want the defaults to be updated IF the Contract is not Activated yet, and IF the Account is changed. I don't want to override any values inadvertently that may have been changed from the default. It is not likely that the Account gets changed on a Contract, but you have to allow for this. So, my first criteria node (in pseudocode) is
Then my Immediate actions on that criteria are Update Record, set:
Now, I SHOULD be able to put in a third update here - update Primary Contact from Account.Primary Contact BUT we run into this issue. https://help.salesforce.com/apex/HTViewSolution?id=000212174&language=en_US - the Process Builder fails IF the Primary Contact on Account is blank. So, you would think, well, I will just add another criteria to my process to keep it all in the same process. Wrong. Yep, I did this - this is why I'm writing this example. Second criteria node
Now, let's think about this - we still don't want to set the primary contact on the Contract unless ALL those criteria are still true. HOWEVER, the process will NEVER get there because Process Builder is very dumb - it only handles TRUE/FALSE. After the first criteria node is executed it will ONLY execute the second criteria node IF the criteria in the first node is FALSE. This has changed now, but I don't know how it would change this issue. No. I want to execute the process again (recursion) AND with the same criteria - just the one additional criteria. This help document comes into play https://help.salesforce.com/apex/HTViewHelpDoc?id=process_advanced_considerations.htm&language=en_US but I am not 100% sure I'm reading it right. "ISCHANGED always evaluates to false when a record is first created". Yes, I get that. I am also not changing the account in this (or any other) process, so I can be confident that ISCHANGED is correct for the first node, but I don't know whether the recursion on the process would mean that ISCHANGED will be true or false on the second node. But it doesn't matter because under no circumstances will anything get to the second node because I only want to do any of this stuff when ISCHANGED is true. So, my options are - create 2 processes both with the same criteria - Nope. Hard to maintain (and actually I want three or 4 lookup fields updated). So it's off to create a Flow for me!. Flows are going to contain all the logic in one place and be much easier to see the logic and build. |
Using the fields selector has a few issues
Want to send an email from Campaign Member and then update Chatter to say that it has been sent? Well you are out of luck. Campaign Member is one of those objects that is not a full Salesforce object, so it does NOT have a chatter feed. You can't post to the feed of a related record, so therefore you can't put a post on the Contact (or Lead) instead. No chatter posts for you! |
"If a formula in a process uses any of the following functions, the formula will return null.
• IMAGE
• INCLUDES
• ISNEW
• ISPICKVAL"
Formulas can only be 3000 characters, which is way less than even regular formulas, and usually the trick is to use Workflows to deal with larger formulas - back to workflows for this one.
As you may notice, I'm not a fan of process builder - YET! and I've made a comment on the button click admin post mentioned above.