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 NAV (Archived)

Make a field un-editable when a checkbox is ticked

(0) ShareShare
ReportReport
Posted on by 2,582

Hi all,

I have created a field which is editable initially. I want to change this field to Uneditable when one checkbox is ticked. How can I make a field Uneditable on demand in nav 2017?

Thanks.

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Luc van Vugt Profile Picture
    on at

    Hi Tina,

    Did you have a look at PAG30 (Item Card) on how this is done on the Planning FastTab? I fyou change "Reordering Policy" field the edit-ability of various fields are changed.

  • Verified answer
    Rajasekhar@MS Profile Picture
    5,569 on at

    Hi

    Take one Boolean Variable, Place it on the Editable property of the field you want to make editable on demand, now when checkbox is ticked on validate change the Boolean value to false. (on open page set Boolean to true)

  • Verified answer
    Binesh Profile Picture
    7,885 on at

    Hello Tina,

    Follow the bellow procedure.

    Declare a boolean variable with Dataset property Yes
    For Example IsEdiatable is a boolean Variable

    Which field you want to editable and non-editable -> Open property ->
    In Editable Property put valus as IsEdiatable .

    Now on CheckBox_OnValidate trigger write code for editable and non-editable.
    IF CheckBoxVariable THEN
       CLEAR(IsEdiatable)
    ELSE
      IsEdiatable := TRUE;

    -----

    Note: In OnOpen Page trigger 

    IsEditable := TRUE;

    //So initially its editable

    -----------------------------------

    Save->Compile->RUN

  • Tina Menezes Profile Picture
    2,582 on at

    Thank you.

    But when I put the boolean variable 'IsEditable' in the property of the field which i require to change dynamically it does not accept it. It says that it is not valid. I have also set the include in dataset to yes

  • Suggested answer
    Mohana Yadav Profile Picture
    61,005 Super User 2025 Season 2 on at

    Did you add it as a global variable or local?

    can you show with screenshots?

  • Suggested answer
    Binesh Profile Picture
    7,885 on at

    Hello Tina,

      show your checkBox code and what error you got in screenshot, also tell us your checkbox variable datatype.

    Why Because if variable declare is issue then you got error something like: 

    You have specified an unknown variable.

    IsEditable

    Define the variable under 'Global C/AL symbols'.

    But you said, Its not valid option, that's why we need to see.

    According to your error, mostly we get if type is Option.

  • Suggested answer
    Amol Salvi Profile Picture
    18,698 on at

    Hope you have defined  the variable as well as you have put that variable in Editable property of field

  • Suggested answer
    Yogesh Kulkarni_ Profile Picture
    1,762 on at

    Please make sure you have added "IsEditable" vaiable as a global in the Page itself and set it to the EditablePropery of a field.

    -Yogesh Kulkarni
    Please verify, if you find answer helpful.

  • Tina Menezes Profile Picture
    2,582 on at

    Hi all,

    My problem is solved. By mistake, I was trying to do it on this process on table instead of the page. Hence it was not accepting it as a valid option. Now I did it on the page. It is working.

    Thanks everyone.

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 NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans