23 Mar’17

Dynamics NAVMake the editable fields un-editable based on a condition in NAV


This article explains how to change the editable fields into un-editable fields based on certain condition. In this article, we make the page fields un-editable on change of status from Open to Released. For example, the fields like No., Description etc. will be freeze when the NAV page status changes to Released.


Microsoft Dynamics NAV 2017.


  1. We create a Boolean field in the Global variable (Ctrl + G) in the NAV page and sets the property by clicking on (Shift + F4) of the boolean variable ‘IncludeInDataset’ to yes. This property is set to yes when the variable is used as the value of the Editable property, enabled property, visible property or StyleExpr property.
  2. Now we select the fields of the NAV which needs to be changed to un-editable and set the enabled properties of the field to the Boolean field name.
  3. Now in the C/AL code (F9), in the ‘OnAfterGetCurrRecord’ we place a condition that if the status is Released then the Boolean field ‘fieldeditable’ is set to false this will freeze the fields and only if the status is open the ‘fieldeditable’ will be set to true. By default the value of the boolean variable is true.
  4. Below is the screenshot of the NAV page with status open.

    Below in the screenshot , the approval status is ‘released’.


Written by

Chris D'Silva

Software Developer

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload the CAPTCHA.

Want to streamline your business processes?

  • This field is for validation purposes and should be left unchanged.

Recent Articles

  • Dynamics 365 Client Diagnostics

    15 March’ 2018

    Main cause of Performance Issues: Bandwidth and latency are the primary characteristics which affects the performance o...

    Read more
  • Closing Blind Shift in MPOS and CPOS in Dynamics 365 for Retail

    15 March’ 2018

    Manual For closing Blind shift in POS: Blind shifts terminate the currently ongoing shift and when logged in a new shif...

    Read more
  • Persistent Filters in the Power BI Service

    13 March’ 2018

    Introduction: The feature is finally release, and it is power BI has announced general availability of persistent filt...

    Read more
  • Cause and Solution for Scribe MSMQ not receiving Message from AX

    10 March’ 2018

    Issue: Microsoft Message Queuing (MSMQ) service running on Server might be unable to receive messages. Therefore, messa...

    Read more
  • User Privileges on SharePoint – D365 Document Integration

    10 March’ 2018

    Overview: Often, we wonder what could be wrong where we see a generic error on Documents in Dynamics 365. Something lik...

    Read more