Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM forum
Answered

Error on custom entity form save

Posted on by Microsoft Employee

I have created an custom entity. I am getting the following error:

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: System.FormatException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #ACDA8ABEDetail:
<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.FormatException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #ACDA8ABE</Message>
<Timestamp>2015-09-17T19:31:27.8738968Z</Timestamp>
<InnerFault i:nil="true" />
<TraceText i:nil="true" />
</OrganizationServiceFault>

Please help.

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Error on custom entity form save

    Thanks all for the valuable suggestions.

    Actually it was a silly error in the Java Script code for setting up a lookup value.

    The code was written as:

    Xrm.Page.getAttribute("Head").setValue([{

    id: serviceResult.Head.Name (should be "Id"),

    name: serviceResult.Head.Name,

    entityType: serviceResult.Head.LogicalName

    }]);

    But the strange thing was this code was able to set the value on the UI, however when the save event was being fired it was throwing the error. That is why i could not figure out easily what the error was.

  • Suggested answer
    Sean Michel Profile Picture
    Sean Michel 340 on at
    RE: Error on custom entity form save

    Hi Girijesh,

    What are you attempting to have the command bar buttons do? Are they executing any scripts? Also, do you have any custom enable rules on the command bar buttons that may execute any script?

    Did this issue occur before you added the ribbon buttons? And finally, are you on-prem or online?

  • Verified answer
    Aiden Kaskela Profile Picture
    Aiden Kaskela 19,688 on at
    RE: Error on custom entity form save

    Hi again,

    Do you have any JavaScript running on load or save on that form? If you had some js setting a field to a bad type just before it's saved, that could cause the error too. The ribbon buttons just being there wouldn't cause this problem.

    Thanks,

     Aiden

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Error on custom entity form save

    Hi,

    Open plugin registration tool and check for ActivityClose plugin on create of an entity. If its there, disable it and then try again.

    Thanks

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Error on custom entity form save

    Just for more information, i have added 3 custom command bar buttons on this form using ribbon bench and this error comes when i click one of these buttons.

    After the click i see this exception and data does not get saved. On every save i see the same unless i refresh the page.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Error on custom entity form save

    Hi Aiden,

    Thanks for the suggestion, however i don't have any plugin for this entity.

  • Suggested answer
    Aiden Kaskela Profile Picture
    Aiden Kaskela 19,688 on at
    RE: Error on custom entity form save

    Hi,

    This is an exception in the plugins, so you need to disable any plugins on your custom entity to verify, then look at your plugin code to see where the problem is. Format exceptions in CRM are typically when you try to set a Guid to something that's not formatted as a Guid so I would look at any place you set lookups first.

    Hope this helps. If so, I would appreciate if you would mark this as the verified answer.

    Thanks,

     Aiden

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,696 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,490 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans