I've attempted the flow using either account or contact objects. With account object I was stuck in that I could only create a new contact, not check if it exists and update accordingly.

With contact object flow I was able to, but it's not triggering correctly. I actually am not sure that it is triggering at all. enter image description here

All that to say-- I'm trying to either a) create or b) update a contact associated with an account if the account info is changed and if that contact already exists or not. Please help! My brain is aching from all the different configurations I've been trying.

  • The Process Builder can only evaluate changes on fields on the Contact object, not changes to fields on the parent Account. – cropredy Oct 26 '20 at 22:32

You most likely need a Flow or Trigger for this. Process Builder only has a limited subset of functionality compared to Flows. You'd use a flow that triggers on a record edit (Account), use Get Records to get the contact, if any, and then decide to create or update based on that result (a Decision).

  • Ok, I've been reading up on Apex Triggers (trailhead.salesforce.com/en/content/learn/modules/apex_triggers/…) and I'm a bit overwhelmed with the code structure. I'm identifying that I need to check for a match between data on the Account and the Account's Contacts. If there is a match, do nothing. Else, create OR(?) modify the contacts to match what is provided on the Account. I think I'd not want to overwrite a billing contact if only the Title has changed, so I'd want to double check to make sure the changes imply a new person or just an update to their information. – Thomas Griffin Oct 28 '20 at 16:14
  • @ThomasGriffin Fair enough. Try a Flow, it's a bit more time consuming to build one (I type really fast), but they're a great alternative for those that don't want to/can't take the time to learn code. – sfdcfox Oct 28 '20 at 16:15
  • Just updated my comment; accidentally posted. I'll look into Flows before going deeper on Apex; could you make an attempt at the bare bones of what the trigger might look like with the provided logic? – Thomas Griffin Oct 28 '20 at 16:17
  • @ThomasGriffin Without any extra frills, the Apex would look like this. However, keep in mind that you also need a unit test. It might be easier to go with the Flow (no pun intended, honest!). – sfdcfox Oct 28 '20 at 16:33
  • Ok, thank you @sfdcfox ; I'll go with Flow and if I can't make it work, I'll revisit this block of code to see if I can wrangle it into working for us; thanks again!! – Thomas Griffin Oct 29 '20 at 14:22

What you are trying to achieve is possible through a flow or trigger. I am providing some links related to those so that you can take a deep dive if you want.

Triggers: https://trailhead.salesforce.com/content/learn/modules/apex_triggers Flows: https://trailhead.salesforce.com/content/learn/modules/business_process_automation

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.