Change Page Editable Property

ecriss15ecriss15 Member Posts: 14
edited 2010-12-10 in NAV Three Tier
I have the following problem: in a customized form I have two buttons : editable and non-editable which change the form editable property. I need to transform this form to a page but the buttons don't work. I tried using a variable but it seems that the page remains with the initial value of the property editable, no matter what I do. I remember seeing in a video from partnersource regarding tranformation tool that you should set the variable used in the OnOpenPage trigger.

So I would like to know if there is a way or a workaorund that I could change the editable property of a page after it is opened or I need to rethink the functionality. I read other posts about this but I didn't find a clear answer, hope I didn't miss anything.


  • mohana_cse06mohana_cse06 Member Posts: 5,503
    what code u have in Onpush trigger of those buttons
  • ecriss15ecriss15 Member Posts: 14
    In the form I have code that changes the editable property of the form, like CurrForm.EDITABLE := TRUE. For the page I added a variable that is included in the dataset and on the buttons I changed the value of this variable. I put this variable in the Editable property of some controls, like group or part and I initialized the value of the variable on OnOpenPage. It takes the right value when I open the form but after that nothing happens no matter what value has the variable.
  • postsauravpostsaurav Member Posts: 708
    Hi ecriss15,

    There is way that can change the editable property of the button in the page.

    Where the code is written to set the button editable or non editable, at that point make the boolean variable true/false depending on condition.

    Put that variable name on the editable property of the control.

    Remember that when u create the boolean variable in CAL GLOBAL OR LOCAL, please set the IncludeInDataset to YES.

    Then and only then u can use that boolean variable into property of the control.

    Let me know if there are any other issues.

    Thanks & Regards,
    Saurav Dhyani

    Do you Know this About NAV?

    Connect - Twitter | Facebook | Google + | YouTube

    Follow - Blog | Facebook Page | Google + Page
  • ecriss15ecriss15 Member Posts: 14
    Thank you very much for your answer. This is exactly what I was trying to do, but i modified the Editable property for the entire group, not for every textbox. I tried modifying for every textbox and it works fine. This is kind of tricky because I have many fields on the page and three parts (from the subforms). It doesn't work for the parts either, I think I have to repeat the actions and create them for every part.
    In this way, the user who makes the page editable will have to use four actions : one for the page and three for the parts. Do you think there is another way to make the parts editable from the actions of the page (not of the part) ? From what I read so far I don't think it is but I'm new to NAV 2009 and maybe I am wrong.
  • jvakjvak Member Posts: 6
    On a page you have 2 modes, a view-mode and an edit-mode. You can switch between them by selecting them in the actions menu on the page (there are also shortcut keys for them)
Sign In or Register to comment.