Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

Entity.IsReadOnly

Posted on by Microsoft Employee

Hello, I've created an ETL app which is essentially a console app that uses the orgservice to make backend data inserts/updates. I'm currently looping through a large set of entities, and performing an update on each entity. I'm getting the following error when I update 1 of the entities:

"The object cannot be updated because it is read only"

I want to be able to identify this state ahead of time, in order to avoid exceptions. My ETL program threw the exception above for an entity. However, a debug watch showed that the entity's read-only property had a value of false, appearing to indicate that the entity was *not* read only.

So is the IsReadOnly property of the entity not reliable or is it used to indicate something else?

*This post is locked for comments

  • Suggested answer
    Karth Profile Picture
    Karth on at
    RE: Entity.IsReadOnly

    Adding to Guido's suggestion, run your code under the context of a user who has the maximum rights on all your CRM entities.

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!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans