Default to View Mode

lvanvugtlvanvugt Member Posts: 774
edited 2010-05-17 in NAV Three Tier
How can I assure that when users double click on a line in a List Page - for example the custmer list - the Task Page - i.e. Customer Card - opens in view mode?

This is issue is similar to the issue raised on this post: Default to Edit mode when opening pages and I initially dropped my question their as a reply to the existing thread. However as I did not get any response so far I decided to create this new thread.

So anybody out their having an answer?

BTW: I want to use this so that user intentionally should choose to edit a record in the task page and cannot edit unintentionally.
Luc van Vugt, fluxxus.nl
Never stop learning
Van Vugt's dynamiXs
Dutch Dynamics Community

Answers

  • manisharma31manisharma31 Member Posts: 285
    Its Dependent on the Page Type you have set.
    Regards,
    Manish
  • lvanvugtlvanvugt Member Posts: 774
    In what sense? Or in other words: could you elaborate on this some more?
    Luc van Vugt, fluxxus.nl
    Never stop learning
    Van Vugt's dynamiXs
    Dutch Dynamics Community
  • manisharma31manisharma31 Member Posts: 285
    Here check this out for detial page types.
    http://msdn.microsoft.com/en-us/library ... 0(v=NAV.60).aspx

    I also read your previous post of sales order from page 9305 & page 42.
    Have you checked which page is opened after you double click on any line in page 9305,is it page 42 or other.
    Regards,
    Manish
  • lvanvugtlvanvugt Member Posts: 774
    Here check this out for detial page types.
    http://msdn.microsoft.com/en-us/library/dd301400(v=NAV.60).aspx
    OK, nothing new to me and nothing that helps me on this. Or am I overlooking something?
    Have you checked which page is opened after you double click on any line in page 9305,is it page 42 or other.
    Page 42.
    Luc van Vugt, fluxxus.nl
    Never stop learning
    Van Vugt's dynamiXs
    Dutch Dynamics Community
  • manisharma31manisharma31 Member Posts: 285
    ok,
    From which menu/path are you opening the page 42.
    Regards,
    Manish
  • lvanvugtlvanvugt Member Posts: 774
    For example:

    CRONUS International Ltd./Departments/Sales & Marketing/Order Processing/Sales Orders
    Luc van Vugt, fluxxus.nl
    Never stop learning
    Van Vugt's dynamiXs
    Dutch Dynamics Community
  • manisharma31manisharma31 Member Posts: 285
    Don't talk in air,
    That does not open page 42,it opens the list page 9305 from where you can go to page 42.
    Regards,
    Manish
  • lvanvugtlvanvugt Member Posts: 774
    8) No offense. The path was meant to say from where I open Page 42 (at least that's how I understood your question).
    Luc van Vugt, fluxxus.nl
    Never stop learning
    Van Vugt's dynamiXs
    Dutch Dynamics Community
  • manisharma31manisharma31 Member Posts: 285
    What i asked is of opening the page 42 directly & not from the list page.
    Does the Page 42 opens directly from any menu.

    OR
    lets say ,give me the path of page 21 which opens directly & not from any of the list page.
    Regards,
    Manish
  • lvanvugtlvanvugt Member Posts: 774
    No sure if I understand you well, because, as far as I know, both task page 42 and 21 cannot be opened form any RTC link/menu. But maybe I am wrong.
    I know they can be opened directly from the object designer (selecting the page and pushing the Run button) and then they will run in View mode. But that's not a real life situation.
    Luc van Vugt, fluxxus.nl
    Never stop learning
    Van Vugt's dynamiXs
    Dutch Dynamics Community
  • manisharma31manisharma31 Member Posts: 285
    yes,now you got that right.

    But you can do one thing,as i have done R & D,on the page 42,subtype=group you can set the editbale value to false.
    You can try to make the editable true or false on some conditions.
    Regards,
    Manish
  • lvanvugtlvanvugt Member Posts: 774
    Doesn't sound to me that that's what I am looking for. It needs to be done for each group?

    Looking at how the Page (42) is run (1) from object designer versus (2) opened from the Sales Order List (9305) by double clicking, there should be a way of making it either open in (a) View or (b) Edit mode.
    Luc van Vugt, fluxxus.nl
    Never stop learning
    Van Vugt's dynamiXs
    Dutch Dynamics Community
  • manisharma31manisharma31 Member Posts: 285
    but again that needs to be restricted to specific users :?:

    Needs to check that..... :!:
    Regards,
    Manish
  • lvanvugtlvanvugt Member Posts: 774
    No need to restrict it specific users ...
    Luc van Vugt, fluxxus.nl
    Never stop learning
    Van Vugt's dynamiXs
    Dutch Dynamics Community
  • manisharma31manisharma31 Member Posts: 285
    if you don't do that then ,how r u gone create master i.e Customer Creation from Customer Card.
    Regards,
    Manish
  • ariellabariellab Member Posts: 7
    Hi

    seems the EDITABLE Property is not supported on Pages (it is on individual controls within a page though)
    http://msdn.microsoft.com/en-us/library/dd355377.aspx

    But we found a workaroud, this I tested out using Windows Scripting Host Automation and SendKeys in the OnOpenPage Trigger to toggle the Editable Property for the Page and it worked.
    However this is NOT SOMETHING I CAN SAY MICROSOFT RECOMMENDS or have tested on a larger scale.
    Anyway, this is a sample of what I tested.

    ...
    Declare WshShell as Automation Variable for 'Windows Script Host Object Model'.WshShell
    In OnOpenPage Trigger:
    ...
    IF ISCLEAR(WshShell) THEN
    CREATE(WshShell,FALSE,TRUE);
    WshShell.SendKeys('^+V');//Ctrl+Shift+V

    here the command for the Edit in case of
    WshShell.SendKeys('^+E') //Ctrl+Shift+E
  • lvanvugtlvanvugt Member Posts: 774
    Hi Ariella,

    Thanx for posting your answer here also. I have tested it and indeed it works. Thanx again. But as i wrote you:
    I am still a bid flabbergasted as running a page from the object designed (see my repro steps) the page is clearly launched in View mode (and the user can change it to Edit mode); so somehow NAV supports this.
    What does the core team in Vedbaek say about this? I think it would worthwhile to escalate this and get it cleared out for NAV partners as it's a worthwhile feature for all.
    Luc van Vugt, fluxxus.nl
    Never stop learning
    Van Vugt's dynamiXs
    Dutch Dynamics Community
  • lvanvugtlvanvugt Member Posts: 774
    Update on my service request to MS regarding this issue:
    "We can not fix this - and do not have a workaround. This is a feature request which we will look into for a future release"
    Technically i think list>>card windows connection is hardcoded and to change it in the way it will allows to be changed with some dynamical property/code requires too many developers efforts and code changes in NAV RTC kernel.
    So I'm sorry to say: I don't see possibilities to change issue in current version.
    However this is in feature requests list and could be included in next NAV 7.
    Luc van Vugt, fluxxus.nl
    Never stop learning
    Van Vugt's dynamiXs
    Dutch Dynamics Community
  • kauffmannkauffmann Member Posts: 56
    I did some investigation and according to me the problem can be solved by using standard NAV properties (and without Windows Scripting Host):

    Settings on the List Page:
    1. Set the Page property CardFormID to the correct Page ID (Why is this property not named 'CardPageID' ? :-k)
    2. Set the Page property Editable to No (otherwise the double click will not work).
    3. Create an Action that opens the Card in View mode, using the Action properties RunObject, RunFormLink and RunFormMode.
    4. Set the Action property ShortCutKey to Return. (Thanks to Mark: http://dynamicsuser.net/blogs/mark_brum ... rtcut.aspx)

    Now you have an action that opens the Card in View mode *and* this action is the default action that is performed when you double click a row in the List. This action is also added to the context menu of the rows, in bold!

    The other actions (Open in View or Edit mode) in the contect menu are still available.
    A good programmer makes al the right mistakes
    My blog
  • lvanvugtlvanvugt Member Posts: 774
    Hi Arend-Jan,

    Great effort. Thanx for that.
    A pitty I cannot hide this new action. It would even be better if the Edit/View actions were available in the Action Designer so we could set ShortCutKey to Return for the View action.

    BTW:
    RunObject = Page 21
    RunFormLink - anything needed here?
    RunFormMode = View

    BTW2 (for other readers): I have created a blog on this topic: How to Set View Mode on Pages as Default
    Luc van Vugt, fluxxus.nl
    Never stop learning
    Van Vugt's dynamiXs
    Dutch Dynamics Community
  • kauffmannkauffmann Member Posts: 56
    Yes, it would definitely be better when the Edit / View actions in the context menu could be modified. Obviously this is not the case with the current RTC.

    In case you want to open the card with the same record as where you double clicked on in the List, then the RunFormLink should contain the primary key field(s).
    A good programmer makes al the right mistakes
    My blog
  • kauffmannkauffmann Member Posts: 56
    kauffmann wrote:
    Yes, it would definitely be better when the Edit / View actions in the context menu could be modified. Obviously this is not the case with the current RTC.

    In case you want to open the card with the same record as where you double clicked on in the List, then the RunFormLink should contain the primary key field(s).

    Ok, I have to correct myself. :roll:

    The Edit/View actions on the context menu will be removed when you remove the CardFormID on the List Page.

    Result: only the new created action as default on the context menu. \:D/
    A good programmer makes al the right mistakes
    My blog
  • SonGoten13SonGoten13 Member Posts: 44
    Hi,

    I am currently working on a NAV2017 Update and it seems there is still no "standard" way to do it.
    Does anyone have new info about this issue?

    greetings
  • lvanvugtlvanvugt Member Posts: 774
    Unfortunately you are right. It hasn't changed.
    Luc van Vugt, fluxxus.nl
    Never stop learning
    Van Vugt's dynamiXs
    Dutch Dynamics Community
Sign In or Register to comment.