Answers.Body: <p>I have a partial answer to this question.  The link above works fine, but you have to ensure that the organisation's membership is inherited by staff.  </p>
  
  <p>To do this you need to edit the membership type and set 'Relationship Type' to 'Employer of' (<strong>not</strong> 'Employee of' which is what I had previously).</p>
  
  <p>Once this is done a renewal reminder will be sent to the organisation's email address <strong>and</strong> the email address of the member of staff who subscribed on behalf of the organisation.</p>
  
  <p>The link in the email that is sent to the member of staff works correctly.  However, the link in the email sent to the organisation doesn't work unfortunately.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-10-25T13:07:37.287Z
Answers.Text: Did you get any further with this? If two people are getting the reminder, whats to stop the renewal happening twice?
  
  I got round this be lopping a month off the Current membership status rule and creating a new status rule Reminders which is the end date minus 1 month. I then created a smart group with primary member set to no, and the Reminder status.
  
  You end up with a group of individuals who need a reminder sending 1 month before membership expires. I then manually send out the reminder to the group.
Answers.UserDisplayName: Tony Horrocks
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-10-25T13:10:53.217Z
Answers.Text: Hi Tony, I'm afraid I didn't get any further with this. Sorry!
Answers.UserDisplayName: William Mortada
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-10-25T13:11:32.763Z
Answers.Text: I edited prev comment
Answers.UserDisplayName: Tony Horrocks
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-10-25T13:16:29.037Z
Answers.Text: Thanks. You could add that as another answer in case it's helpful for anyone else.
Answers.UserDisplayName: William Mortada
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-01-22T18:42:42.103Z
Answers.LastActivityDate: 2016-01-22T18:42:42.103Z
Answers.UserDisplayName: William Mortada
Answers.Body: <p>It seems to me like part of the problem with organization renewals, is that the page does not know that the individual already has an &quot;onbehalf of&quot; membership, so it does not display, for example, information about the membership expiration, and I'm not sure how the membership is updated afterwards (implicitly, it should update the existing membership).</p>
  <p>My solution was to use the <a href="https://civicrm.org/extensions/membership-renewal-link" rel="nofollow noreferrer">membership renewal link</a> extension, which generates tokens with the checksum and membership ID (mid) in the URL.</p>
  <p>However, for that to work, I had to <a href="https://github.com/civicrm/civicrm-core/pull/22951" rel="nofollow noreferrer">apply this patch</a> to CiviCRM core (pending review, as of CiviCRM 5.48).</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-03-16T18:45:26.957Z
Answers.Text: had you already checked that the related contact was a 'current employee' with 'permissions' to edit the Org?
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-03-17T19:04:02.573Z
Answers.Text: @petednz-fuzion Yep. Did it work for you, without the patch?
Answers.UserDisplayName: bgm
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-03-18T18:41:36.513Z
Answers.Text: sending links for 'on behalf of' renewals to a permissioned current employer has worked for years (unless I am having a complete memory lapse)
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-03-16T11:36:11.420Z
Answers.LastActivityDate: 2022-03-16T11:36:11.420Z
Answers.UserDisplayName: bgm
Answers.Body: <p>I got round this by creating a group for the non-primary memberships. I then set up a membership scheduled reminder and limited the emails to the group I created.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-10-25T13:38:07.930Z
Answers.LastActivityDate: 2019-10-26T08:03:48.137Z
Answers.LastEditDate: 2019-10-26T08:03:48.137Z
Answers.UserDisplayName: Tony Horrocks
Body: <p>I'm creating a scheduled reminder email that is sent to members six weeks before their membership expires.  I want the email to link to the membership page with the contact details of the organisation filled in.</p>
  
  <p>I have managed to do this successfully for individuals by using the following link in the email:</p>
  
  <pre><code>[site.com]/civicrm/contribute/transact?reset=1&amp;id=1&amp;{contact.checksum}&amp;cid={contact.contact_id}
  </code></pre>
  
  <p>However, this doesn't work for organisations.  It only fills in the email address of the organisation but not the organisation's name, address and postcode.</p>
  
  <p>I presume that this is something to do with the fact that the organisation membership form is filled out <em>on behalf of</em> the organisation.</p>
  
  <p>Is there a way I can change this link to ensure that the organisation's full details are filled in when the user clicks on the link?</p>
  
  <p>I am using CiviCRM 4.6.10 on Drupal 7.41.</p>
  
Tags: <civimember><scheduled-reminders>
Title: How can I create a membership renewal link for organisations?
ThreadText: # How can I create a membership renewal link for organisations?
  
  (Asked by: username_0 on 2016-01-22)
  
  I'm creating a scheduled reminder email that is sent to members six weeks before their membership expires. I want the email to link to the membership page with the contact details of the organisation filled in.
  
  I have managed to do this successfully for individuals by using the following link in the email:
  
  ```
  [site.com]/civicrm/contribute/transact?reset=1&id=1&{contact.checksum}&cid={contact.contact_id}
  
  ```
  
  However, this doesn't work for organisations. It only fills in the email address of the organisation but not the organisation's name, address and postcode.
  
  I presume that this is something to do with the fact that the organisation membership form is filled out *on behalf of* the organisation.
  
  Is there a way I can change this link to ensure that the organisation's full details are filled in when the user clicks on the link?
  
  I am using CiviCRM 4.6.10 on Drupal 7.41.
  
  **Tags:** civimember, scheduled-reminders
  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_0 on 2016-01-22. Score: 1 | Accepted answer
  
  I have a partial answer to this question. The link above works fine, but you have to ensure that the organisation's membership is inherited by staff.
  
  To do this you need to edit the membership type and set 'Relationship Type' to 'Employer of' (**not** 'Employee of' which is what I had previously).
  
  Once this is done a renewal reminder will be sent to the organisation's email address **and** the email address of the member of staff who subscribed on behalf of the organisation.
  
  The link in the email that is sent to the member of staff works correctly. However, the link in the email sent to the organisation doesn't work unfortunately.
  
  > **Comments:**
  > **username_1**: Did you get any further with this? If two people are getting the reminder, whats to stop the renewal happening twice?  I got round this be lopping a month off the Current membership status rule and creating a new status rule Reminders which is the end date minus 1 month. I then created a smart group with primary member set to no, and the Reminder status.  You end up with a group of individuals who need a reminder sending 1 month before membership expires. I then manually send out the reminder to the group.  
  > **username_0**: Hi username_1, I'm afraid I didn't get any further with this. Sorry!  
  > **username_1**: I edited prev comment  
  > **username_0**: Thanks. You could add that as another answer in case it's helpful for anyone else.  
  
  ---
  
  ### Answer by username_2 on 2022-03-16. Score: 2
  
  It seems to me like part of the problem with organization renewals, is that the page does not know that the individual already has an "onbehalf of" membership, so it does not display, for example, information about the membership expiration, and I'm not sure how the membership is updated afterwards (implicitly, it should update the existing membership).
  
  My solution was to use the [membership renewal link](https://civicrm.org/extensions/membership-renewal-link) extension, which generates tokens with the checksum and membership ID (mid) in the URL.
  
  However, for that to work, I had to [apply this patch](https://github.com/civicrm/civicrm-core/pull/22951) to CiviCRM core (pending review, as of CiviCRM 5.48).
  
  > **Comments:**
  > **username_3**: had you already checked that the related contact was a 'current employee' with 'permissions' to edit the Org?  
  > **username_2**: @username_3 Yep. Did it work for you, without the patch?  
  > **username_3**: sending links for 'on behalf of' renewals to a permissioned current employer has worked for years (unless I am having a complete memory lapse)  
  
  ---
  
  ### Answer by username_1 on 2019-10-25. Score: 2
  
  I got round this by creating a group for the non-primary memberships. I then set up a membership scheduled reminder and limited the emails to the group I created.
  
  
  ---
  
  