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 / 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,593 Super User 2025 Season 2 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,593 Super User 2025 Season 2 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

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