I feel like there should be a straightforward answer here, but I'm coming up short...
Trigger event: Account lookup field on Lead(s)/Contact(s) are updated OR a particular Account field is updated
Action: Update specified field on Lead(s)/Contact(s) based on the related Account's field value.
Desired behavior: Asynchronous updates so that the initial DML on Leads/Contacts/Accounts is not affected. (Ideally ~1 min)
- Process Builder: Minimum 1 hr wait
- PB + Flow: Flow runs in user context, will cause permissions exceptions
- PB + Flow + Invocable Apex: Cloud Flow Designer cannot assign collection variables to Apex (see here)
- Process Builder (immediate action) + Invocable Apex + Queueable: I'm not 100% clear on how PB handles bulk updates. I've noticed in the past that PB will create multiple queued items from a single bulk transaction, so my assumption was that it's separate transactions for each record. Say, for example, I mass update the Account field on 200 Leads, if that satisfies a PB criteria node, is that considered one transaction or 200? If the former, then I'll hit the Queueable limit of 50 per transaction. If the latter, I won't.
- If it does consider it one transaction, I assume the recommended way to proceed would be through Triggers. But, if there's something better, I'd love to know.
Thanks in advance!