Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using hooks to update contacts/nodes as needed (RE: CiviCRM contact <--> Backdrop Entity sync) #24

Open
laryn opened this issue Oct 9, 2018 · 0 comments

Comments

@laryn
Copy link
Contributor

laryn commented Oct 9, 2018

As an alternative to #20 @herbdool suggests using hooks instead of CiviCRM Entity (pasted from Gitter below):

What's your use case for civicrm_entity? I've found it an unwieldy beast so haven't used it

I've usually just put a contact reference field on a node. If it needs to be automated then I've used hooks to call civi API. E.g create a contact when adding a node

[When a contact is merged or deleted in CiviCRM] gets more complex. It is similar problem to contact/user syncing.

this hook might help https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_merge/

As for deleting contacts you might need to check on this hook if there's a node related to a contact https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_postProcess. I'm not sure if it's called when a contact is deleted (it won't help with direct API deletion

This module will help figure out what gets fired when https://github.com/eileenmcnaughton/civicrm_developer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant