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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / It's possible to updat...
Power Apps
Answered

It's possible to update inactive entities with CrmServiceClient. Is this a bug?

(0) ShareShare
ReportReport
Posted on by 19

Hi,

 

I'm once again evaluating DataVerse/Power Apps and I wonder if the following behaviour is a bug or by design:

As soon as an entity is in an inactive state, it cannot be changed via forms. This is the desired behaviour. But when using an Update request via the CrmServiceClient, it is still possible to perform changes.

 

Actually I don't like this behaviour. I think it should be possible to prevent all changes to an entity.

I know it is possible to lock fields with Business Rules, but there is no 'lock all fields' command, therefore it is really annoying. Did I missed something?

I have the same question (0)
  • krombipils Profile Picture
    19 on at

    I guess I found the answer to my question (question is related to business rules, but obviously the same is true for statuses): Locked-field-using-business-rules-is-getting-updated-through-API/td-p/564170 

     

    I wonder if I am the only one who does not like this behaviour.

     

  • Verified answer
    EricRegnier Profile Picture
    8,720 Most Valuable Professional on at

    Hi @krombipils,

    Good to know you found your solution. To supplement, apart from Case (incident) entity/table you can still update inactive records via the APIs/SDK, Power Automate, Excel import, workflows, etc. Business rules are mainly used for front-end (i.e forms) logic so you won't be able to unlock inactive records, however you can lock specific fields with business rules.

    Hope this helps...

  • Rudylar Profile Picture
    18 on at

    To bounce on this topic, my use case (and I guess a pretty standard one) is that INACTIVE entities should NOT be modified (at least headers, not necessary lines). I am being said that this cascading setting is not included in Dynamics 365.

     

    For instance, if an Account's owner changes, we don't want won opportunities (inactive) to have their owners changed too. But changing active opportunities could be a requirement.

     

    Distinguishing between active and inactive when setting up relationship behavior should be possible.

    Anybody knows?

  • MichaelFP Profile Picture
    1,847 Super User 2025 Season 2 on at

    @Rudylar for your scenario i believe that the best is to use an plugin that will validate if the opportunity state is won or inactive, and if it is using pre-image change back the data that you want to keep.

  • EricRegnier Profile Picture
    8,720 Most Valuable Professional on at

    Hi @Rudylar,
    A bit like @Michaelfp mentioned, the best way to prevent changes on inactive records would be with synchronous pre-operation plugin. If the status (statecode) is inactive (value 1), simply throw an InvalidPluginExecutionException, and that's it.
    Note: InvalidPluginExecutionException is the only supported custom exception that can be thrown

     

    Hope this helps!

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 hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard