Most of the time when you do the developments you need to set boolean variables to properties on selected controls in a page. Those controls such as  Editable Property, Enabled Property, Visible Property, or StyleExpr. IncludeInDataSet Property Dynamics NAV will allow you to do your customizations without any runtime errors.

Let’s take an example and see. I need to enable true / false when page load or when do validation in a field. Suppose, when I enter Customer Name in Customer Card in Dynamics NAV, I need to enable few selected fields. So you can simply create few boolean variables as globule variables, Then you can assign it to Visible / Enable property in selected control (Page Level). But when you run the page you will get runtime error.

Microsoft Dynamics NAV
—————————

The identifier ‘ShowVisibleBool’ could not be found.
—————————
OK
—————————

Anyway you might get this error or not as per the version that you are working. But keep in your mind if you get this kind of error what would be the solution. Solution is go to your boolean type variable, Then select Properties, You will find IncludeInDataSet property. By default it is <No> , But you have to turn it ‘Yes’.

Below guidelines as per the Microsoft MSDN

Sets whether the C/AL variable’s value is included in the dataset of the RoleTailored client.

Applies To C/AL variables of Boolean Data Type or Integer Data Type on pages.
Property Value Yes to include the variable’s value in the dataset; otherwise, No. The default is No.
You must set this property to Yes if the variable is used as the value of the Editable Property, Enabled Property, Visible Property, or StyleExpr Property.

Bellow picture shows you guide for the property.

NAVSupports.com

Add User 2013R2

Workflow Dynamics NAV 2016