Skip to main content

Notifications

Customer Service forum

Issues in creating Child Cases

Posted on by 90

Hi, 

I am facing the duplicate record error while creating child cases . This issue occurs when you try to create more that 1 child case. CRM Version is 9.0.2.2279. 

Duplicate Record : A record with matching key values already exists.

Error code: 0x80040237

Error code: 0x80040237Session Id: 760b4dec-82a8-4f9f-9506-2f33bc332edbActivity Id: 8e6cb3a9-1545-4264-89f1-1b30486d7c6bTime: Mon Oct 08 2018 11:22:30 GMT-0700 (Pacific Daylight Time)

Is this any open defect in the platform ? 

I already checked Parent Child Case mapping which doesn't seem to have any issues. 

75206.Capture.PNG

Categories:
  • Suggested answer
    Arun Vinoth Profile Picture
    Arun Vinoth 11,613 on at
    RE: Issues in creating Child Cases

    I would do a dummy post create plugin & check all the arrributes coming in target entity compared to new case creation record from CRM UI, Scribe, Child case & vanilla CRM case.

    This will definitely strike a clue.

  • vijaykiran Profile Picture
    vijaykiran 90 on at
    RE: Issues in creating Child Cases

    We disabled plugins  and synchronous workflows but the issue still remains. There are no duplicate detection or SLA rules on the case entity. We are trying to create child cases through OOTB button on case form .

    The parent cases are created via scribe , so I doubt that something is going wrong during the case creation. Investigating this. We are planning to raise a Microsoft ticket if not resolved today.

  • RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: Issues in creating Child Cases

    Hi,

    How are you creating these child cases. Please share more info.

  • Suggested answer
    Arun Vinoth Profile Picture
    Arun Vinoth 11,613 on at
    RE: Issues in creating Child Cases

    Verify if you have any plugin, WF, Action doing anything on case create, disable them one by one & troubleshoot.

    Find out is there any duplicate detection rule enabled?

    QueueItem, SLA, etc also has to be verified.

  • vijaykiran Profile Picture
    vijaykiran 90 on at
    RE: Issues in creating Child Cases

    Checked this . There is no secondary key.

  • Suggested answer
    Dynamics365 Rocker Profile Picture
    Dynamics365 Rocker 7,755 on at
    RE: Issues in creating Child Cases

    Please check if there is any secondary key.

  • Johnny Gong Profile Picture
    Johnny Gong 6,482 on at
    RE: Issues in creating Child Cases

    Hi vijaykiran,

    Have you added any upsert operations limitation in your process? If you’re inserting data, there is some possibility that a record with the same id value already exists in the system and your plugin may not want to update it. You could find such condition operation example form the official linkage which is used to prevent update in upsert.

    {  

     "error":

      {  

      "code":"",  

      "message":"A record with matching key values already exists.",  

      "innererror":{  

       "message":"Cannot insert duplicate key.",  

       "type":"System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]",  

       "stacktrace":<stack trace removed for brevity>}  

      }  

    }  

    docs.microsoft.com/.../perform-conditional-operations-using-web-api

    Hope it would help.

    Regards

    Johnny

  • LeoAlt Profile Picture
    LeoAlt 16,329 on at
    RE: Issues in creating Child Cases

    Hi partner,

    I have created three child cases on my pure environment successfully.

    Is there any custom plug-ins or workflows with Case entity?

    Best Regards

    Leo

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

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,802 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,129 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,154

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans