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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Lock a field after saving a record

(0) ShareShare
ReportReport
Posted on by 2,510

Hi, I am wondering if we can disable a field after save. For example, when user creates a new record, it is editable, but after save, it not editable.

*This post is locked for comments

I have the same question (0)
  • Verified answer
    ashlega Profile Picture
    34,477 on at

    You might probably just create a business rule and lock the field when createdon has some data.

  • Community Member Profile Picture
    on at

    Did you find solution ? please 

  • Community Member Profile Picture
    on at

    for created on field I've to set specific value :(

  • EmaMyrtollari Profile Picture
    5 on at

    You can use js to lock the field by registering a function onLoad of the form.

    Just make sure to add the condition so that the field is locked only on update:

    var  formType= Xrm.Page.ui.getFormType();

    if(formType == 2){

    Xrm.Page.getControl("new_fieldname").setDisabled(true);

    }

    Ref: crmbusiness.wordpress.com/.../

  • Suggested answer
    MrBello Profile Picture
    5 on at

    Guys, I finally found an answer for this. For Business rules conditions to work, "THE FORM MUST HAVE THE FIELD ON IT".

    $&(*# I wasted so much time before finding this darn fact!. Business rules are a great idea. But MS you guys have a less than subpar execution on the UI and the implementation of this stuff.

    I had the exact same challenge: I need to lock a set of fields only after the initial record has been saved.

    Innocently I went about with a BR that if "Created On" Contains data... I went ahead and lock the fields.

    Well, this would not work for the longest time and I could not figure it out until I tested the condition against a different field that was in the form. And then it worked. Whoala... I added the 'Created On' field on the footer of the form, and from that point on, all worked as expected.

    MS: Wouldn't be nice to validate the rule and warn the user about a field referenced that is NOT in the form? that way that validate function will do something useful for once.

    Hope it helps someone out there.

    F Bello

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans