Answers.Body: <p>I've done something similar with Views, VBO and a custom action.  There is an "Add relationship with contact" action in VBO but for more control over the action you can <a href="https://www.drupal.org/node/2052067" rel="nofollow noreferrer">write a custom action</a>.  </p>
  
  <p>In my case, the view is of Civi contacts with one of several relationship types to the org. The action is a 'Set as Correspondent' button.  Only one person at a time holds the Correspondent relationship with the org so the action uses <code>civicrm_api3()</code> to find and end any current Correspondent relationships, create a new relationship between the selected contact and org and create an activity for info purposes.</p>
  
  <p>Your action could do something similar but check there are no more than 4 existing relationships of that type before creating a new one. </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-14T17:53:25.810Z
Answers.Text: This is the missing piece I'm looking for! Do you have code you can share for your "Set as Correspondent" action?
Answers.UserDisplayName: Jon G - Megaphone Tech
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-05-27T23:22:25.817Z
Answers.Text: nudge - did anything get shared re this custom action? ;-)
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-14T10:47:56.483Z
Answers.LastActivityDate: 2018-03-14T10:47:56.483Z
Answers.UserDisplayName: Aidan
Answers.Body: <p>I have a similar requirement for a project. This piece is not yet in active development, but I anticipate building an Angular form (probably based on crmUiWizard) to allow management of relationships and possibly also a limited subset of contact details. In my case it's (probably) NOT acceptable for a member administrator to search contact names in the database (without limitations); might need to rely on the dedupe feature to allow entry of new contacts without creating a mess.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-13T19:23:32.150Z
Answers.LastActivityDate: 2018-03-13T19:23:32.150Z
Answers.UserDisplayName: universalhandle
Answers.Body: <p>Set up a View that shows the logged in person the Org they are related to, and the Indivs related to that Org. Provide an 'update' button/link to load the url of a webform where they can they edit or add new Contacts.</p>
  
  <p>I can probably add more if I understand at what point this approach is problematic (eg Backdrop has Webform but not Webform-CiviCRM?)</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-14T01:25:26.917Z
Answers.Text: How does one create a new relationship from the View?
Answers.UserDisplayName: Jon G - Megaphone Tech
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-14T05:10:02.650Z
Answers.Text: Provide an 'add another' link in the view that takes them to webform eg in View Header or Footer - the link would have eg cid1 value in url
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-14T05:20:14.073Z
Answers.Text: But given your experience in such things i am sure i must be misunderstanding the requirement. happy to skype share if that helps
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-14T01:12:23.573Z
Answers.LastActivityDate: 2018-03-14T01:12:23.573Z
Answers.UserDisplayName: petednz - fuzion
Answers.Body: <p>It might be possible to do this via a View that lists people that are linked to the contact person's Org and provides customized links from the view to a webform (passing contact IDs via URL to populate the webform). You may also need the <a href="https://civicrm.org/extensions/relationship-permissions-acls" rel="nofollow noreferrer">Relationship Permissions ACL extension</a> and have these relationships set up to grant editing permissions.</p>
  
  <p>e.g. If you have a view that is pulling the current user (contact person with permissions to add/edit), you can use the View to also get the Org and the other members based on relationships, then feed them into a Webform with CiviCRM functionality enabled, feeding the contact IDs into the webform using the URL. ("If the url contains e.g. cid1=123, it will be used to pre-populate this contact (takes precidence over other default values).") </p>
  
  <p>You could set up the form to only allow input for 6 contacts (the org and 5 members) and specify their relationships in the webform/civicrm settings, you can feed the contact IDs if they exist, or allow new contacts to be created if they don't.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-14T15:56:20.517Z
Answers.Text: I just had a thought that might solve the issue in terms of a max number of member listings and edited above.
Answers.UserDisplayName: Laryn
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-13T21:37:45.277Z
Answers.LastActivityDate: 2018-03-14T15:55:15.590Z
Answers.LastEditDate: 2018-03-14T15:55:15.590Z
Answers.UserDisplayName: Laryn
Body: <p>We have organizational memberships - each organization can have up to five individuals who are listed as members.  We do this via the membership "Relationship Type" feature, and it works well.</p>
  
  <p>However, competing platforms have a dashboard that allows the contact person for an organization add/remove the individual members that should be part of the record.  How can this be implemented with CiviCRM?</p>
  
  <p>Civi 4.7.31, Backdrop 1.9.2 - so Views/Webform/etc. are all options.  It's acceptable for a member administrator to search contact names in the database.  Writing custom code is an option if there's a simple-ish way to do this.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-03-13T19:23:29.123Z
Comments.Text: You're just referring to allowing org admins permission for editing the CiviCRM contacts of the members, nothing related to Backdrop users, right?
Comments.UserDisplayName: Laryn
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-03-13T20:28:17.417Z
Comments.Text: Correct @Laryn-CEDC.org. I'm stating the CMS in case CMS-side modules present a solution.
Comments.UserDisplayName: Jon G - Megaphone Tech
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-02-12T16:37:32.343Z
Comments.Text: Curious if you ever found (or made) an answer to this one?
Comments.UserDisplayName: Laryn
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-02-12T19:31:02.480Z
Comments.Text: Nope, sorry @Laryn-CEDC.org.  The client lost interest.
Comments.UserDisplayName: Jon G - Megaphone Tech
Tags: <civimember><relationships><user-dashboard><backdrop>
Title: How can I let members edit their relationships?
ThreadText: # How can I let members edit their relationships?
  
  (Asked by: username_0 on 2018-03-13)
  
  We have organizational memberships - each organization can have up to five individuals who are listed as members. We do this via the membership "Relationship Type" feature, and it works well.
  
  However, competing platforms have a dashboard that allows the contact person for an organization add/remove the individual members that should be part of the record. How can this be implemented with CiviCRM?
  
  Civi 4.7.31, Backdrop 1.9.2 - so Views/Webform/etc. are all options. It's acceptable for a member administrator to search contact names in the database. Writing custom code is an option if there's a simple-ish way to do this.
  
  **Tags:** civimember, relationships, user-dashboard, backdrop
  
  > **Comments:**
  > **username_1**: You're just referring to allowing org admins permission for editing the CiviCRM contacts of the members, nothing related to Backdrop users, right?  
  > **username_0**: Correct @username_1-CEDC.org. I'm stating the CMS in case CMS-side modules present a solution.  
  > **username_1**: Curious if you ever found (or made) an answer to this one?  
  > **username_0**: Nope, sorry @username_1-CEDC.org.  The client lost interest.  
  
  ---
  
  ## 4 answers
  
  ### Answer by username_2 on 2018-03-14. Score: 2
  
  I've done something similar with Views, VBO and a custom action. There is an "Add relationship with contact" action in VBO but for more control over the action you can [write a custom action](https://www.drupal.org/node/2052067).
  
  In my case, the view is of Civi contacts with one of several relationship types to the org. The action is a 'Set as Correspondent' button. Only one person at a time holds the Correspondent relationship with the org so the action uses `civicrm_api3()` to find and end any current Correspondent relationships, create a new relationship between the selected contact and org and create an activity for info purposes.
  
  Your action could do something similar but check there are no more than 4 existing relationships of that type before creating a new one.
  
  > **Comments:**
  > **username_0**: This is the missing piece I'm looking for! Do you have code you can share for your "Set as Correspondent" action?  
  > **username_3**: nudge - did anything get shared re this custom action? ;-)  
  
  ---
  
  ### Answer by username_4 on 2018-03-13. Score: 1
  
  I have a similar requirement for a project. This piece is not yet in active development, but I anticipate building an Angular form (probably based on crmUiWizard) to allow management of relationships and possibly also a limited subset of contact details. In my case it's (probably) NOT acceptable for a member administrator to search contact names in the database (without limitations); might need to rely on the dedupe feature to allow entry of new contacts without creating a mess.
  
  
  ---
  
  ### Answer by username_3 on 2018-03-14. Score: 0
  
  Set up a View that shows the logged in person the Org they are related to, and the Indivs related to that Org. Provide an 'update' button/link to load the url of a webform where they can they edit or add new Contacts.
  
  I can probably add more if I understand at what point this approach is problematic (eg Backdrop has Webform but not Webform-CiviCRM?)
  
  > **Comments:**
  > **username_0**: How does one create a new relationship from the View?  
  > **username_3**: Provide an 'add another' link in the view that takes them to webform eg in View Header or Footer - the link would have eg cid1 value in url  
  > **username_3**: But given your experience in such things i am sure i must be misunderstanding the requirement. happy to skype share if that helps  
  
  ---
  
  ### Answer by username_1 on 2018-03-13. Score: 0
  
  It might be possible to do this via a View that lists people that are linked to the contact person's Org and provides customized links from the view to a webform (passing contact IDs via URL to populate the webform). You may also need the [Relationship Permissions ACL extension](https://civicrm.org/extensions/relationship-permissions-acls) and have these relationships set up to grant editing permissions.
  
  e.g. If you have a view that is pulling the current user (contact person with permissions to add/edit), you can use the View to also get the Org and the other members based on relationships, then feed them into a Webform with CiviCRM functionality enabled, feeding the contact IDs into the webform using the URL. ("If the url contains e.g. cid1=123, it will be used to pre-populate this contact (takes precidence over other default values).")
  
  You could set up the form to only allow input for 6 contacts (the org and 5 members) and specify their relationships in the webform/civicrm settings, you can feed the contact IDs if they exist, or allow new contacts to be created if they don't.
  
  > **Comments:**
  > **username_1**: I just had a thought that might solve the issue in terms of a max number of member listings and edited above.  
  
  ---
  
  