Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

Updating certain entities throws error about not being able to update

Posted on by Microsoft Employee

Hello, I am making a program that updates all chosen records from a large pool of entities. Everything works, except for certain entities are giving me an error: System.ServiceModel.FaultException1: the entity cannot be updated.  I've tried to look for a property such as "Attribute.IsValidForUpdate" but there doesn't seem to be one for Entities. Does anyone have any suggestions?

Thanks

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Updating certain entities throws error about not being able to update

    This was indeed the issue. I am still very new to CRM and I didn't realize that some of the out of the box entities such as Case had a statecode I had to check. I was able to Check its State, and if closed I opened it up, made the changes and then closed it again. Thanks for the help!

  • Suggested answer
    PranavShroti Profile Picture
    PranavShroti 4,510 on at
    RE: Updating certain entities throws error about not being able to update

    You may be trying to update an intersect entity directly which is not allowed, or perhaps a child entity without having any parent. please check.

    Hope this helps,

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Updating certain entities throws error about not being able to update

    There are many entities throwing this error, but for example. Just now I tried updating a entity and this error was thrown: System.ServiceModel.FaultException`1: 'The 'Update' method does not support entities of type 'applicationfile'.' Is there a way to filter for ALL entities that do not support the 'update' method?

  • Verified answer
    Daniel Wikell Profile Picture
    Daniel Wikell 2,360 on at
    RE: Updating certain entities throws error about not being able to update

    Hi

    "The entity cannot be updated" - you can also see this message if you are trying to update an entity that is in a read only state such as an Invoice or Case that has been closed or a Lead that has been qualified etc.

    In this case you want to check the statecode and statuscode attributes and make sure that the entity you are trying to update is not in an inactive state.

  • Suggested answer
    Kalpavruksh D365 CoE Profile Picture
    Kalpavruksh D365 CoE 2,545 on at
    RE: Updating certain entities throws error about not being able to update

    Hi,

    Please check the user role with which you are trying to update the record. check if the attribute you are trying to update is not a system attribute which cannot be updated. Check if the type casting is done appropriately. Please check the link which talks about deprecated messages: docs.microsoft.com/.../dn932124(v=crm.8)

    If found useful, please mark this answer as verified.

  • Suggested answer
    PranavShroti Profile Picture
    PranavShroti 4,510 on at
    RE: Updating certain entities throws error about not being able to update

    Are you sure your logged in current user is having appropriate security roles to update records in those entities ?

  • Radu Chiribelea Profile Picture
    Radu Chiribelea 6,667 on at
    RE: Updating certain entities throws error about not being able to update

    Hello,

    Could you please provide a list of the entities you are trying to update? (Especially the out of the box ones)

    Also, what fields are you trying to update? Make sure you aren't updating any technical fields

    Regards,

    Radu

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans