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)

Field properties in C/AL code

(0) ShareShare
ReportReport
Posted on by 159

Hi Experts

Can anyone tell me if there is a way to change field's properties like visible, editable, etc.

using C/AL code?

Thanks in advance

*This post is locked for comments

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

    Hi Angel,

    Let NAV be your guide, meaning: have a look at the standard application. Take for example Page 30 (Item Card) and see how, for example, costring controls are enable using boolean variables UnitCostEnable and StandardCostEnable to set the value of the Enabled property of these controls dynamically to TRUE or FALSE. Crucial for these variables is to set the IncludeInDataSet property to Yes.

    And of course google is your friend too:

  • Verified answer
    Community Member Profile Picture
    on at

    Hi,

    You can create one boolean variable and assign the same variable to required field's Editable or Visible Property.

    4452.1.JPG

    Later as per your conditions, you can assign the value to that particular boolean variable.

    You can refer standard "No." field property in any of the sales or purchase documents (OnOpenPage > SetDocNoVisible).

    Hope this helps.

  • Angel Arteaga Profile Picture
    159 on at

    Thanks again for help Vishal it works

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)

#1
HoangNam Profile Picture

HoangNam 7

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans