Open a card page in uneditable mode from list

BeeGeeSBeeGeeS Member Posts: 2
edited 2015-05-13 in NAV Three Tier
When I am in a list page and double click on a record the card form that opens up opens by default in editable mode. Is there a way for me to change it so that it opens in un-editable mode and then the user can choose to edit it by clicking the edit button?

Example: I am in the item list and double click on one of the items. The item page opens up in editable mode whereas I would like it to open in un-editable mode. If the user then wants to change the item or create a new one he should be able to do so by clicking on edit or new buttons.

I've tried to set the Editable property on the page to FALSE and also to set CurrPage.EDITABLE(FALSE) in OnOpenPage but it doesn't seem to work as I would have expected.

Comments

  • abhinav0408abhinav0408 Member Posts: 35
    Just try it using variable(boolean).
    In Editable Property put this variable and OnOpenPage set this variable as False.

    Hope that will work for You... :thumbsup:
  • gpeturssongpetursson Member Posts: 3
    Hi,

    As from NAV 2013 R2 you can use this code OnOpenPage;
    IF "No."<>'' THEN
      CurrPage.EDITABLE(false);
    

    But in earlier version the only solution I found was to declare WshShell as Automation Variable for 'Windows Script Host Object Model'.WshShell and then this code OnOpenPage;
    IF "No."<>'' THEN BEGIN
      IF ISCLEAR(WshShell) THEN
        CREATE(WshShell,FALSE,TRUE);
      WshShell.SendKeys('^+R');
    END;
    

    Which is not a good solution.
    The user gets a warning the first time he uses it on the RTC client and it will cause an error in the webclient unless you code your way around it with the CLIENTTYPE variable.

    Kind regards
    Gudmundur
  • guiyoteguiyote Member Posts: 12
    Are there any solution?
    I have the same question.
    How to open a page card in editable mode false, from a list page?
  • guiyoteguiyote Member Posts: 12
    Thanks Mohana.
    The worst is the double click functionality, which opens a card page in edit mode. Even setting Editable=No in the list page.
    Apparently the way is to use Windows Shell, in NAV7. But i think is not a good solution.
    So, I prefer to don’t set de “CardPageID” property in the list page, and use two new Action with RunPageMode in Edit/View mode.
Sign In or Register to comment.