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.
Answers
Manish
Never stop learning
Van Vugt's dynamiXs
Dutch Dynamics Community
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.
Manish
Never stop learning
Van Vugt's dynamiXs
Dutch Dynamics Community
From which menu/path are you opening the page 42.
Manish
CRONUS International Ltd./Departments/Sales & Marketing/Order Processing/Sales Orders
Never stop learning
Van Vugt's dynamiXs
Dutch Dynamics Community
That does not open page 42,it opens the list page 9305 from where you can go to page 42.
Manish
Never stop learning
Van Vugt's dynamiXs
Dutch Dynamics Community
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.
Manish
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.
Never stop learning
Van Vugt's dynamiXs
Dutch Dynamics Community
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.
Manish
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.
Never stop learning
Van Vugt's dynamiXs
Dutch Dynamics Community
Needs to check that..... :!:
Manish
Never stop learning
Van Vugt's dynamiXs
Dutch Dynamics Community
Manish
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
Thanx for posting your answer here also. I have tested it and indeed it works. Thanx again. But as i wrote you:
Never stop learning
Van Vugt's dynamiXs
Dutch Dynamics Community
Never stop learning
Van Vugt's dynamiXs
Dutch Dynamics Community
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.
My blog
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
Never stop learning
Van Vugt's dynamiXs
Dutch Dynamics Community
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).
My blog
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/
My blog
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
Never stop learning
Van Vugt's dynamiXs
Dutch Dynamics Community