Skip to content

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

@laryn

Description

@laryn

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions