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

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

CurrPage.EDITABLE(FALSE);

(0) ShareShare
ReportReport
Posted on by 3,003

I have this code in an Action button of a New page I've created.

The idea is that if I call my "post" function, and it returns "TRUE", the page should not be editable at all

Register Receipt - OnAction()
IF (MyCodeUnit.Post(Rec)) THEN 
   CurrPage.EDITABLE(FALSE);

However, this is not working. The page is still editable, even after "CurrPage.EDITABLE(FALSE);"

Any ideas on why it's not working or how to achieve this behaviour??

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at
    RE: CurrPage.EDITABLE(FALSE);

    Did you check the Editable property of the Page ? By default it would be TRUE always.

    msdn.microsoft.com/.../dd301158(v=nav.90).aspx

  • Suggested answer
    IshwarSharma Profile Picture
    729 on at
    RE: CurrPage.EDITABLE(FALSE);

    Did you try to debug? Is (MyCodeUnit.Post(Rec)) returning True and going to the next line of code?

  • Verified answer
    Rajasekhar@MS Profile Picture
    5,569 on at
    RE: CurrPage.EDITABLE(FALSE);

    Hi

    You can not use CurrPage,Editable(FALSE) on Actions, instead of CurrPage.Editable, you can set all the fields of the Page Editable or non editable by defining one Boolean variable and place it on the Editable property of all fields or controls.

  • Verified answer
    Tharanga Chandrasekara Profile Picture
    23,118 on at
    RE: CurrPage.EDITABLE(FALSE);

    It does not work like that. You will have to use the field property of the Editable and assign a Boolean variable to it. True that you need to go to each field and assign the variable, it will be a pain, but that is the only option I can see. Hope someone will prove me wrong.

  • Suggested answer
    Nareshwar Raju Vaneshwar Profile Picture
    5,596 on at
    RE: CurrPage.EDITABLE(FALSE);

    Hi,

    Agreed with Raj and Tharanga.

    Also, since you are using NAV 2016, you can try redesigning your func (MyCodeUnit.Post(Rec)) inside a TryFunction. Actually the inverse of TryFunction.

    Hope it helps.

  • Suggested answer
    Amol Salvi Profile Picture
    18,698 on at
    RE: CurrPage.EDITABLE(FALSE);

    Try to use one boolean variable to make page editable and non editable.

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

#1
Saurav.Dhyani Profile Picture

Saurav.Dhyani 2 Super User 2025 Season 2

#2
RK-25090803-0 Profile Picture

RK-25090803-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans