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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Lock field after creat...
Power Apps
Answered

Lock field after creation of record | Model Driven App

(0) ShareShare
ReportReport
Posted on by 559

Hi guys,

 

I have a record "Yearly Budget". It has startBudget, startDays, remainingBudget and remainingDays. They are all required decimal columns. I want to lock remainingBudget and remainingDays for users editing after the "Yearly Budget" is created. However my custom plugins should still be able to update these fields. 

 

What would be the best way to achieve this?

 

Best Regards,

Anthony

I have the same question (0)
  • Verified answer
    AnthonyD Profile Picture
    559 on at

    I used this: https://xrmdynamicscrm.wordpress.com/2020/07/04/dynamics-365-lock-a-field-after-saving-a-record/ 

    However the Business Rule does not fire somehow.

     

    Best Regards,

    Anthony

  • Guido Preite Profile Picture
    1,488 Super User 2024 Season 1 on at

    the link you posted only works for client side validation, if a user uses some js code or an extension like "Level up for Dynamics 365/Power Apps" the constraints you put can be easily removed and the user can modify the values.

    If some users can't modify the values but only read them (or not read them at all) usually is done with Field Level Security (probably on youtube you can find some other tutorials about this subject), keep in mind that your plugin can run in two contexts: the user doing the operation or a specific user defined when you register the plugin. As you wrote that your plugin must be able to update these values you have two ways:

    1) you are sure that the user triggering the update has the permissions to do it (if John Smith is not allowed to update that fields and John Smith triggers the plugin, the plugin will fail to update the values)

    2) you put a specific user (that has the rights to update that field of course) when the plugin runs and all the plugin operations will run under this specific user context.

     

  • Ram Prakash Duraisamy Profile Picture
    5,699 Super User 2026 Season 1 on at

    Hello @Anthony_Dob,

     

    Hope you are doing good. 

     

    As per your request you can simply write a Business Rule as per below screenshot.

     

    rampprakash_0-1640415044193.png

     

    What this will do:

     

    After record creation the Field will get locked in Client side but we can update the record in Business Rule

     

    Please mark as Answer if it is helpful and provide Kudos


    Subscribe : https://www.youtube.com/channel/UCnGNN3hdlKBOr6PXotskNLA
    Blog : https://microsoftcrmtechie.blogspot.com

  • AnthonyD Profile Picture
    559 on at

    Hi @rampprakash 

     

    I already used a Business Rule and somehow it is not doing anything for me. Here is how it's set up.

    2021-12-25 10_02_08-Postvak IN - dobbelaere_anthony@hotmail.com - Outlook.png

    Any idea's why its not working?

     

    Best Regards,

    Anthony

  • Ram Prakash Duraisamy Profile Picture
    5,699 Super User 2026 Season 1 on at

    Hello @Anthony_Dob,

     

    Is Created on and all other three fields in the form ?

     

    as you said it's in client side script, Can you please change Scope to RESPECTIVE FORM on Top Right.

     

    Please mark as Answer if it is helpful and provide Kudos

     

     

    Subscribe : https://www.youtube.com/channel/UCnGNN3hdlKBOr6PXotskNLA

    Blog : https://microsoftcrmtechie.blogspot.com

  • Verified answer
    Bipin D365 Profile Picture
    971 on at

    Hi @Anthony_Dob ,

     

    Please make sure you have added all the fields which you are referring in BR on the form.

     

    Please mark my answer verified if this is helpful!

    Regards,

    Bipin Kumar

    Follow my Blog: https://xrmdynamicscrm.wordpress.com/

  • AnthonyD Profile Picture
    559 on at

    @bipinshan @rampprakash ,

     

    Adding the "Created on" field to the form did the job. I put is on invisible and the Business Rule works.

     

    Best Regards,

    Anthony

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
Haque Profile Picture

Haque 103

#2
WarrenBelz Profile Picture

WarrenBelz 82 Most Valuable Professional

#3
wolenberg_ Profile Picture

wolenberg_ 67 Super User 2026 Season 1

Last 30 days Overall leaderboard