Skip to main content

Notifications

Dynamics 365 general forum

Deleting Expired Contract

Posted on by Microsoft Employee

     Hello,


      I'm having trouble with something that i expected to be quite straightforward. I cannot seem to find the way to delete an expired contract. I can delete an expired contract if i renew it then cancel it, but in this way i always end up with one more expired contract that can't be deleted.
      The contracts that i want to delete, have contract lines but i'm not able to delete them, since the contract is expired, and if i renew it another contract is created.
      What am i missing? Is it impossible to delete expired contracts from Dynamics?
      I already read this question : community.dynamics.com/.../216017 but the problem seems different..
      thanks in advance,

Categories:
  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Deleting Expired Contract

    Thanks Goutam, it your help and some digging i find out the problem. It seems i had a plugin creating a related entitlement everytime i tried to delete the contract (the plugin was supposed to fire only on creation, not deletion).

  • Verified answer
    gdas Profile Picture
    gdas 50,085 on at
    RE: Deleting Expired Contract

    Hi,

    There is a restrict delete relationship between Contract and Contract (for renewed/originating contracts).

    This means if you have renewed an expired contract, that expired contract is now linked to the renewed contract.

    If you need to delete the old expired contract, you will need to either delete all the renewed contracts originating from this one, of remove the "originating contract" reference from all renewed contracts linking to the expired contract you are deleting.

    You can query the renewed contracts through advanced find by looking for contracts where originating contract equals the contract you are trying to delete. Once you have your results you can choose what to do with them.

    Unfortunately CRM does not allow you to change the relationship behaviour for the originating contract, so these are your only options if you wish to delete them.

    See here old thread -

    [View:https://social.microsoft.com/Forums/en-US/39484dc7-4f80-4c5c-ba5b-6fa29abfe2a3/deleting-expired-contracts?forum=crm]

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,902 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,336 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans