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) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Batch update "Employee of" relationships to permit editing, or make it default?
Pages: [1]

Author Topic: Batch update "Employee of" relationships to permit editing, or make it default?  (Read 1840 times)

Rob McCausland

  • I post occasionally
  • **
  • Posts: 33
  • Karma: 0
    • Community Media Database
  • CiviCRM version: 3.3.5
  • CMS version: Drupal 6.20
  • MySQL version: 5
  • PHP version: 5.2
Batch update "Employee of" relationships to permit editing, or make it default?
March 05, 2011, 08:04:07 am
Hey, friends -

I just learned I can batch update Individual contacts (using Import > fill) to establish employee relationships with existing Organization contact records.  Just did that for 650 individuals. 

Now I want to give them all permission to edit their related organization contact records.  Is there anyway to do that globally - that is, not have to bring up each individual contact's record, go into their Relationship tab and check the "has permission to edit" box? 

If that can't be done via a search-and-apply-an-action approach, might it be possible somewhere to set the default behavior of that type of relationship, where the employee always has permission to edit, unless deselected?

Thanks for any advice.

~ Rob McCausland

Rob McCausland

  • I post occasionally
  • **
  • Posts: 33
  • Karma: 0
    • Community Media Database
  • CiviCRM version: 3.3.5
  • CMS version: Drupal 6.20
  • MySQL version: 5
  • PHP version: 5.2
Re: Batch update "Employee of" relationships to permit editing, or make it default?
March 05, 2011, 04:51:09 pm
I found this line in a page about candidate features in 3.4:

Allow users to expose "relationships" to profile forms and display (this is currently done in a limited way for Employer Name). (XD: done, use crmAPI in a custom template)

Might this be a path to a solution for my problem - allowing batch updating via profiles?  If so, where can I learn about this "crmAPI in a custom template?"

Thanks.

Rob McCausland

  • I post occasionally
  • **
  • Posts: 33
  • Karma: 0
    • Community Media Database
  • CiviCRM version: 3.3.5
  • CMS version: Drupal 6.20
  • MySQL version: 5
  • PHP version: 5.2
Re: Batch update "Employee of" relationships to permit editing, or make it default?
March 05, 2011, 05:50:14 pm
Well, I've found more tracks for this question in this forum.  Two years ago, in a topic titled "Relationships - automatic conferring of 'can update' rights," peterd asked:

Quote
is it possible to set a Relationship so that it always confers "can view and update information for" ie I want 'Company Admin" to always confer 'can update' rights over the Company, and "Employer of" to always confer 'can update' for the Employees...that way we don't have to configure the relationship for each individual

To which Donald Lobo replied:
Quote
1. the relationship type does not have this feature, but chris should be able to implement it with the "civicrm_post" relationship object hook (on create or edit). should be a fairly easy hook implementation

Though the thread continued for some length, it was all only about a second issue - getting permissions to go from B to A as well as from A to B.

Did any solutions ever come for peterd's first question?  Is there in fact some code that's now been written to do this?   It'd be great if there were something that I could just copy and paste into an appropriate location (je ne suis pas un codeur).  I'd greatly appreciate your help!
« Last Edit: March 05, 2011, 05:53:44 pm by Rob McCausland »

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Batch update "Employee of" relationships to permit editing, or make it default?
March 05, 2011, 07:36:18 pm
Hey Rob - not that I recall, sorry.
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

Rob McCausland

  • I post occasionally
  • **
  • Posts: 33
  • Karma: 0
    • Community Media Database
  • CiviCRM version: 3.3.5
  • CMS version: Drupal 6.20
  • MySQL version: 5
  • PHP version: 5.2
Re: Batch update "Employee of" relationships to permit editing, or make it default?
March 05, 2011, 08:45:16 pm
Thanks ~

perhaps you can help me on a related question - once permitted, can individuals update their organization's custom data fields via profiles, or is updating via profiles also restricted to the primary contact fields (name, phone address, email).

I'd swear I just got a test account access to a full-boat profile, but minutes later I can't reproduce it - all I get is "You do not have permission to edit this contact record. Contact the site administrator if you need assistance."

I'm hoping I've just got a switch wrong somewhere.

Rob McCausland

  • I post occasionally
  • **
  • Posts: 33
  • Karma: 0
    • Community Media Database
  • CiviCRM version: 3.3.5
  • CMS version: Drupal 6.20
  • MySQL version: 5
  • PHP version: 5.2
Re: Batch update "Employee of" relationships to permit editing, or make it default?
March 05, 2011, 09:05:57 pm
yeah - a wrong switch - I'm back on track now - thanks again, though.

rfenwick

  • I’m new here
  • *
  • Posts: 20
  • Karma: 1
Re: Batch update "Employee of" relationships to permit editing, or make it default?
February 10, 2015, 09:22:45 am
I am also looking to do this - batch update so that all "employees of" an organisation have permission to update the employer record.  Google and a look around the forum hasn't turned anything up and I wondered if this has moved on at all since 2011?

I guess there is a SQL solution changing fields directly in the database, but I would like to avoid that if at all possible because I am a certified moron when it comes to SQL.

R

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Batch update "Employee of" relationships to permit editing, or make it default?

This forum was archived on 2017-11-26.