contact object has account field which has lookup relationship to account.
3 个回答
Hi Payal,
Are you sure a trigger is the correct approach? If you want to show account details on the contact, you can use formula fields or a flow on the contact record page. Neither of these options will consume extra storage or processing resources.
If you really want to copy account data onto a contact, you also have to consider the account details changing after they've been synced, forcing you to sometimes make large updates if an account has many contacts.
Lastly, you don't need a trigger to copy this data. You can build a process on contact to copy the data when a contact is created, and a second process on account to update child contacts when the account changes.