So to fix this on owner changes that come from the Account level, since workflows and processes won't fire off this owner change, we can make a headless flow that we can then execute as the action when Account owner changes.
Lets start by creating the flow. When you create it, be sure to select it as an Autolaunched Flow, which means it requires no user interaction and can be called from a Process.
Next, we will need to setup a few input variables that will be used to both locate opportunities linked to the account, as well as the new Account Owner ID that we wish to assign to the newly created Object C.
Our first step (and start step) in the flow will be to lookup Opportunities that are linked to the Account ID. Assign the return value to a new Sobject Collection Variable.
After we have the Opportunities, we will loop through them with a new Loop step. We will loop through the LinkedOpportunities and assign a new Loop Sobject Variable. You only need the Id field to be returned.
For every "opp" in the collection, we want to create a new record. Here is where we will define anything that we want to set on our Object C record we are creating. Here is where we will set the OwnerId of the new Object C to the accountownerid and set the opportunity to be the current opp.id we are at in the loop. This creates your object C for every opportunity linked to the source account and sets the ownerid to the account ownerid. Save and activate the flow.
Now we just need to create a Process on Account that will fire this flow. Use the same logic you are using on your opportunity process to fire off on account owner change, only instead of trying to create an object c record, select Flow as your action and then select the Flow you just created.
After all this, you should be good to go. This will fire off anytime the account owner changes, and will create object C's for every opportunity linked to that account, link it to the opportunity, and set the owner as the new account owner. Let me know if this doesn't work for you.
Salesforce has deprecated the ISNULL()
formula function. I can't find an exact date on it, but it was deprecated at least 6 years ago.
Instead, try using ISBLANK()
. It can be used everywhere that ISNULL()
is used.
Process Builder is...quirky (to put it charitably), so this may be enough to get things working as you expect. There is also some precedent for switching to ISBLANK()
being the solution (look at Gail Flowers' comment on 2016-10-6, the bottom one at time of writing)
Best Answer
I believe you are subject to this when a task is created as a result of Send an email:
https://help.salesforce.com/apex/HTViewSolution?id=000213837&language=en_US