web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Cannot deactivate (edit) or delete Business Rules

(0) ShareShare
ReportReport
Posted on by

Yesterday while editing a business rule I accidentally hit save as a few times and ended up with 4 copies of the same business rules.

I went to clean it up and was able to purge 1 copy, and the original.

But when i went to deactivate the 3rd one, it says there is a 'duplicate' record.  Log says 'Cannot insert duplicate key' and nothing more.  Not helpful.

When i went to deactivate the 4th one, it DID deactivate, but when i try to delete it, it says 'record could not be deleted because of an association'.  Opening the log is useless - just the same error - 'The object you tried to delete is associated with another object and cannot be deleted'.

I've published all in between just for good measure.

I've looked all over for a process/workflow that I can kill to stop this to no avail so this is NOT good since it's allowing a flawed business rule to run wild with no way to stop it.

Has anyone else seen this and has anyone found a solution yet or is this a MS bug?

I'm running on-prem.

Thank you.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    PS Profile Picture
    23,577 on at

    Change the names of each of them, save it and then delete it if not required

  • Daniel at VNS Profile Picture
    on at

    tried that too - could only change the names of the ones i could deactivate but still, cannot delete them

    i'm thinking maybe there is some runaway WF process and if i can isolate it and kill it, that might release to lock that's causing this problem  haven't found a way to find it though

  • Suggested answer
    PS Profile Picture
    23,577 on at

    Can you try removing all the conditions from your rule and then try it. Just do it for the one's which you dont want to use

  • Suggested answer
    PS Profile Picture
    23,577 on at

    Hi Daniel,

    if it did not work even after removing conditions; here:

    community.dynamics.com/.../enhanced-business-rules-houston-we-have-a-problem

    Seems to be a bug :(

  • PS Profile Picture
    23,577 on at

    Raise a ticket to Microsoft

  • Daniel at VNS Profile Picture
    on at

    tried that as well - you have to be able to deactivate to do that and you have to have at least one condition to save the changes

  • NatrajY Profile Picture
    3,040 on at

    Try deactivating it from Advanced Find like the screenshot below and then delete it.

    business_2D00_rules.png

  • Daniel at VNS Profile Picture
    on at

    Thanks Natraj but same result.  Nothing useful in the logs either.  Unless anyone has ideas, looks like I get to burn a M$ support case on this.

    12_2D00_13_2D00_2016-8_2D00_15_2D00_14-AM.png 12_2D00_13_2D00_2016-8_2D00_15_2D00_14-AM.png

    Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: System.Web.HttpUnhandledException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #7391BCAC

    Detail:
    <OrganizationServiceFault xmlns:i="www.w3.org/.../XMLSchema-instance" xmlns="schemas.microsoft.com/.../Contracts">
    <ErrorCode>-2147220970</ErrorCode>
    <ErrorDetails xmlns:d2p1="schemas.datacontract.org/.../System.Collections.Generic" />
    <Message>System.Web.HttpUnhandledException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #7391BCAC</Message>
    <Timestamp>2016-12-13T16:15:23.6927505Z</Timestamp>
    <InnerFault>
    <ErrorCode>-2147220953</ErrorCode>
    <ErrorDetails xmlns:d3p1="schemas.datacontract.org/.../System.Collections.Generic" />
    <Message>The object you tried to delete is associated with another object and cannot be deleted.</Message>
    <Timestamp>2016-12-13T16:15:23.6927505Z</Timestamp>
    <InnerFault i:nil="true" />
    <TraceText i:nil="true" />
    </InnerFault>
    <TraceText i:nil="true" />
    </OrganizationServiceFault>

  • NatrajY Profile Picture
    3,040 on at

    Go the default solution and location the business rule. Then click on "Show Dependencies" and see what the dependencies are.

  • Suggested answer
    Daniel at VNS Profile Picture
    on at

    They were the same as the other duplicate business rule.  However, i was able to finally delete this (without burning a support ticket with M$) after the application of 8.2 update.  We'll never know if that fixed it or the subsequent reboots fixed it but I just noticed that I am able to now delete this rogue B/R so if anyone else encounters this problem, if you've updated to 8.2, try a reboot.  Maybe some process got hung up that prevented deletion or maybe it was something in the 8.2 update.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans