Using EDA package. When we create a new contact, if we link it directly to a business account or household account, an affiliation is not automatically created. ,
1. Is that the correct flow?
2. If I would like to auto create an affiliation can I just create a workflow or should I somehow add it to the Trigger Handle/Apex Class? If the answer is yes, can someone help with detailed instructions please? Thanks for any help
I think this could be accomplished with a Process Builder/Flow. Let's start with what you're doing before we can prescribe a potential solution. What I am reading is:
- An account exists
- You create a Contact and specify the Account from Step 1 as that contact's Account
- Expected outcome would be that after making that Contact a "child" of that Account, you want to see an Affiliation created?
What types of contacts are we talking about? Are these any kind of contact that gets added to an Account. The reason I ask is because when you create an account, if you don't specify the account it belongs to it should create an Account type of your choosing (based on EDA Settings) and assign the contact to that account. If you're asking for that to create an affiliation with the same account as well, I would think we can do that as a flow as well (but I digress).
In the larger scheme of things, you should be able to create a Process Builder process (might have to be a Flow but we can get there) that looks at the Account you've associated with the Contact and create an Affiliation object for that account and that contact. You'd have to tell the process to populate the status, start/end dates etc. as well.
You could also do this with your own triggers as well but process builder and flow have a lower barrier to entry if you're not a developer. (It's been awhile for me since I'ver leveraged process builder and flow so I may have some holes here). Also, I want to be sure I fully understand the use case as well.