The NAV 2009 role tailored client has this great feature called the action pane.
This allows you to execute tasks on a page that used to be the menubuttons in the classic client.
The major advantage of this action pane is that it's more clear to the end user (intuitive) and the end user can modify how it looks bu personalisation.
One of the drawbacks of this functionality is that it does not allow you to execute actions on the subpages. This needs to be done via this stupid small lightning button which noone can find. Not intuitive at all.
So wouln't it be great if you can execute this from the Action Pain? Yes, you can!
How do we do that.
Step 1 - Add an Action Group
This is a new feature in SP1.
Open page 42 and go to the properties. Here we change the PromotedActionCategoriesML and add the lines.
Please notice that we leave the first and third empty because they are reseved for 'New' and 'Reports'.
Next we are going to add the line actions to the actions of the page.
Because the RTC hides actions that do nothing we add a MESSAGE statement to the action
Now when we run the page the lines appear in the actions.
And the messagebox appears
Next step is to add the action to the action pane. This is done in the properties of the action.
Off course we use the Dimensions image and we promote it. The category is 4, the one we added before in the page properties remember?
So now, when we run the page it looks like this.
But, it does not activate the actions on the lines. How do we do that?
My idea is to use the windows sendkeys. Remember this feature? In the classic client I always use that to close the client from codeunit 1 if people login twice.
So if we implement this we need to send CTRL + SHIFT + D.
Let's go back to the action C/AL code and implement this
Now when we push the button again this will happen
Off course you need to place the cursor on the correct salesline first.
Nice trick, Mark!
The another work-around is:
I create a new Action "Line Dimension" on Page Header (Page 42), and then add this code in the trigger:
and then Promote it, give it a Shortcut, and voila!
thank you for the solution.
I'd like to repeat the same for another function which hasn't keys (for example "Lines -> Functions -> Get Price...").
I've added key Ctrl+Y (assume) and repeat steps for creating action on Header. When I press Ctrl+Y the Get Sales Price window is appeared, but when I click the new action - I have no result :(
Do you have any ideas why?
thank you in advance
Thank you very much... works like s charm
No sorry. Have not tris this on that page.
If I do this for the Item Tracking Lines and run the page in RTC, the service tier connection get lost and NAV get's shut down... ring any bells?
Great post this will really help me.
Wow! The approach is very interesting. Thank you!
You're welcome. ;)
Just one of those things that you need in the real world.
Learned something again. Thanx Marq.