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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

make a page in view mode to edit mode using code

(0) ShareShare
ReportReport
Posted on by

I created a page which is linked to an action of an another  page.  for eg : consider 'A ' and 'B ' as 2 pages. Page 'B' get opened as part of a button(action) click of page ' A'  , a blank page

Intially 'B ' is a blank page with all its fields in non ediatble mode. Many actions is linked to this page.  Data get created on this page as part of various actions. 

My issue is that  among various fields one field is a checkbox . when i enable the checkbox , i want to make another field in edit mode using programing method(codes).

I tried many methods for this. But i failed.....plz help.plz give support.

How to make a page in view mode to edit mode by using C/Side in Navision RTC 2009.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Community Member Profile Picture
    on at

    Hi,

    Suppose you have a two fields on the form that is in non-editable mode. And you have a check box, if you click on that check box then these two fields should be in editable mode. For doing this, write the code on OnPush Trigger of check box like this...

    If check box = true then begin

    CurrForm.field1.visible(true);

    CurrForm.field1.editable(true); 

    CurrForm.field2.visible(true);

    CurrForm.field2.editable(true); 

    CurrForm.UPDATECONTROLS;

    end;

    This is just for help. This is not a complete code. According to your code you can use it in c/al. 

    Thanks

    Niraj Kumar

    http://niraj-msnav.blogspot.com

    http://nirajdynamicsnav.wordpress.com

  • Suggested answer
    jcastro Profile Picture
    2,245 on at

    I think the easiest way to accomplish this would be to work with page B being editable from the start, but play with the property "DelayedInsert" of Page B instead. You might get a similar result in a way simpler way.

    You can check more info regarding DelayedInsert here: msdn.microsoft.com/.../dd301257(v=nav.80).aspx

  • Suggested answer
    Suresh Kulla Profile Picture
    50,269 Super User 2026 Season 1 on at

    After page is opened i don't think there is a way to make the page editable from non-editable, you have to add the code in OnINit or OnOpenPage trigger of the page or you can use page variable and and set the editable before you open it.

    Example:
    
    SalesHeader.SETRANGE("No.","Sales Order No.");
    SalesOrder.SETTABLEVIEW(SalesHeader);
    // Add other condition here and if satisfy then
    SalesOrder.EDITABLE := FALSE;
    SalesOrder.RUN;


  • Community Member Profile Picture
    on at

    Dear All,

    Thanks to all for this support . But  this solution didn't solve my issue. 

    Suppose page 'A' be a released Work Order  and the  page B is  linked to the page's current Work Order. The use of page B is to create some records realated to its  corresponding Work Order. There are many methods for creating the records in  page B.

    So initially page 'B ' is blank(no data in page and in its table related to this Work order). This page is in the form of  header and lines and the header conatins 3 fields and among them one field is a checkbox  All the fields in header are in non editable mode except the checkbox. 

    when i put a tick in the checkbox ,  i want to make another field in editable mode without pressing new button(ctrl+l). 

     

    I know how to set a field in editable  mode or non ediatble mode using a global variable and code. I already set for this field.

    If I  press new button (ctrl+N) first and  later  if I am enabling the checkbox , the other field is get changed to editable mode. 

    I want to know How to make a page in new mode or view mode using C/AL code?  Plz help. plz..........

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

#1
TAHER_El_Mehdi Profile Picture

TAHER_El_Mehdi 2

#1
sliderxb Profile Picture

sliderxb 2

#1
broberts Profile Picture

broberts 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans