1

It seems like it should be possible to use Civicrm Entity and Rules to remove a contact from a group, but I don't know how to fetch and change the status of the contact in the CiviCRM Group. The best I've managed is setting the "is_active" flag on the group, which isn't helpful.

I've seen this question: How can I use Drupal Rules to remove a contact from a group, and I realise doing this is possible using the CiviRules extension, but it is not working (probably because I have civirules 1.3 and can't upgrade because the server runs PHP5.3).

2

Just added a rules action "Unassign contact from group" to the dev release of CiviCRM 2 days ago, along with "Assign contact to group"

This will be in beta7 when it gets released in a couple of weeks, after some new PRs get tested and merged in.

If you have the user object you can use the "Load or Create CiviCRM Contact" action, then use the "Assign Contact to Group" action, to assign the contact one or more groups

This issue had some basic instructions: https://www.drupal.org/node/2854256

Get the dev version here: https://www.drupal.org/project/civicrm_entity/releases/7.x-2.x-dev

or beta7 or above when it comes out...

  • This looks promising, but on a multilingual site I get an AJAX HTTP error: column not found. I've added details to the Drupal issue page. – Tenz May 21 '17 at 15:02
  • CiviCRM Entity doesn't support multi-lingual CiviCRM installations at this time, although I believe my answer is the right answer and should be accepted. – jackrabbithanna Aug 6 '17 at 0:52
  • I've gotten to the part 'Assign CiviCRM Contact to Group' but am getting stuck at the 'Data Selector' part. What 'Data Selector' values should I be using for these two actions? I'm getting the error 'Fatal error: require_once(): Failed opening required 'civicrm/Contact/BAO/Contact.php' with all the different values I've chosen. – spinsheet Mar 14 '18 at 19:17
  • If you want maybe goto chat.civicrm.org, the civicrm entity room, and ping @jackrabbithanna and if possible give me the export code for your rule so I can look at it. – jackrabbithanna Mar 14 '18 at 19:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.