Automatically assign primary account contact to child accounts

Automatically assign primary account contact to child accounts

Hi there,

We'd like to assign an account's primary contact to all associated child accounts.

I have created a checkbox custom field under the contact form and I have created a multi-lookup field as well to ensure the contact can be assigned to multiple accounts.

I'd like to ensure that, when the 'Primary Contact' checkbox is checked, this contact is automatically associated with any child accounts tied to the parent. I am assuming that this could be done using a custom deluge function but I am not sure where to start?