CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • Creating Groups
Pages: [1]

Author Topic: Creating Groups  (Read 474 times)

bpmccain

  • I post frequently
  • ***
  • Posts: 255
  • Karma: 5
  • CiviCRM version: 4.1
  • CMS version: Drupal 7.12
  • MySQL version: 5.2
  • PHP version: 5.2
Creating Groups
August 11, 2011, 06:37:24 pm
Looking at trying to create groups through the API (as I need to create 220 of them), but it seems a lot more confusing that creating contacts, addresses, e-mails etc.

Half of them will be regular groups, while half will be smart groups (to be used for ACL management).

It's the Where_clause, select_tables, and where_tables that are giving me trouble.

Anyone got an example of a create group using API v3 for:
  • A regular group with no contacts added initially
  • A smart group based with members based on city

Thanks

Brian

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Creating Groups
August 11, 2011, 08:04:12 pm

If you have so many groups that u want to ACL, i'd strongly recommend that you consider using the ACL Hooks:

http://wiki.civicrm.org/confluence/display/CRMDOC40/CiviCRM+hook+specification#CiviCRMhookspecification-Permissionrelatedhooks

The UI based ACL scheme might not scale to that many groups, IMO

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

bpmccain

  • I post frequently
  • ***
  • Posts: 255
  • Karma: 5
  • CiviCRM version: 4.1
  • CMS version: Drupal 7.12
  • MySQL version: 5.2
  • PHP version: 5.2
Re: Creating Groups
August 12, 2011, 04:47:10 am
Hmm, thanks Lobo - that looks like an interesting approach.

I'll give it a try today. There is an awful lot to learn about CiviCRM - but it seems to be setting up nicely for us. Looking forward to contributing once I get the basics under my belt.

Brian

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • Creating Groups

This forum was archived on 2017-11-26.