Answers.Body: <p>Pradeep's answer is good if this is a one-off situation.  If you think you might encounter this on an ongoing basis, the <a href="https://github.com/CiviCooP/org.civicoop.membershippayment" rel="nofollow noreferrer">Link Membership to Contributions</a> extension is designed precisely for this.  CiviCoop produced several <a href="https://civicrm.org/blog/jaapjansma/useful-membership-extensions" rel="nofollow noreferrer">useful extensions for administering membership payments</a> including this one.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-10-01T21:18:32.513Z
Answers.LastActivityDate: 2018-10-01T21:18:32.513Z
Answers.UserDisplayName: Jon G - Megaphone Tech
Answers.Body: <p>Through UI its bit difficult(impossible). If its a matter of single record then i would suggest you to use API explorer to do it.</p>
  
  <p>Navigate to CiviCRM >> Support >> Developer >> API Explorer</p>
  
  <ol>
  <li><p>Create Membership payment for old membership (23 is old membership id(without contribution) and 45 is contribution id)
  <a href="https://i.sstatic.net/5Dm2I.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/5Dm2I.png" alt="enter image description here"></a></p></li>
  <li><p>Delete new membership.</p></li>
  </ol>
  
  <blockquote>
    <p>Note: Backup db before performing any api actions</p>
  </blockquote>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-10-02T15:27:59.437Z
Answers.Text: Thanks! I haven't done any work with the API before but this seems like a good chance to learn.
Answers.UserDisplayName: Sam F.
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-10-01T16:22:44.623Z
Answers.LastActivityDate: 2018-10-01T16:22:44.623Z
Answers.UserDisplayName: Pradeep Nayak
Body: <p>I had a member sign up for an annual membership while their current membership was still active, but they used a slightly different address and so it created a duplicate contact with a new membership. I merged the two contacts and so now I have one contact record with two memberships. I want to keep the older membership and delete the newer one, so I manually renewed the older one. However, deleting the newer one will delete the contribute record associated with that membership.</p>
  
  <p>How can I reassign that contribution, or at least remove the link between the contribution and the newer membership, so that I can delete that membership?</p>
  
  <p>Thanks!</p>
  
Tags: <civimember><contributions>
Title: Is it possible to reassign a contribution linked to a membership?
ThreadText: # Is it possible to reassign a contribution linked to a membership?
  
  (Asked by: username_0 on 2018-10-01)
  
  I had a member sign up for an annual membership while their current membership was still active, but they used a slightly different address and so it created a duplicate contact with a new membership. I merged the two contacts and so now I have one contact record with two memberships. I want to keep the older membership and delete the newer one, so I manually renewed the older one. However, deleting the newer one will delete the contribute record associated with that membership.
  
  How can I reassign that contribution, or at least remove the link between the contribution and the newer membership, so that I can delete that membership?
  
  Thanks!
  
  **Tags:** civimember, contributions
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2018-10-01. Score: 4
  
  Pradeep's answer is good if this is a one-off situation. If you think you might encounter this on an ongoing basis, the [Link Membership to Contributions](https://github.com/CiviCooP/org.civicoop.membershippayment) extension is designed precisely for this. CiviCoop produced several [useful extensions for administering membership payments](https://civicrm.org/blog/jaapjansma/useful-membership-extensions) including this one.
  
  
  ---
  
  ### Answer by username_2 on 2018-10-01. Score: 2
  
  Through UI its bit difficult(impossible). If its a matter of single record then i would suggest you to use API explorer to do it.
  
  Navigate to CiviCRM >> Support >> Developer >> API Explorer
  
  1. Create Membership payment for old membership (23 is old membership id(without contribution) and 45 is contribution id)
     [![enter image description here](https://i.sstatic.net/5Dm2I.png)](https://i.sstatic.net/5Dm2I.png)
  2. Delete new membership.
  
  > Note: Backup db before performing any api actions
  
  > **Comments:**
  > **username_0**: Thanks! I haven't done any work with the API before but this seems like a good chance to learn.  
  
  ---
  
  