I'm trying to call a function present on the lines (subform of a page) from the header.....it is possible but it's not picking up the selected record of the lines!
For Example you can have a look at the "Show Lines Dimensions" of a Sales Order...it is not like before you can't call the function of the subform from the header...
you have to call it from the actions of the subform!!!
Have you had the same problem??
Is that true??
That's really Bad!
Thanks
Comments
Whether this will change in the future, I can't tell - but I know that the Dev team has this problem on the radar.
Group Program Manager, Client
Microsoft Dynamics NAV
http://blogs.msdn.com/freddyk
The information in this post is provided "AS IS" with no warranties, and confers no rights. This post does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion.
I was thinking that maybe with a key shortcut to call an action in the subform and and action in the header to send the shortcut key could resolve the problem....?
I Tried with a windows shell automation and the sendkeys command without any luck...
Do you think is possible?
p.s.
Yout blog is the best Freddy
http://www.mibuso.com/dlinfo.asp?FileID=1123
D not forget that when you are using the shell automation, it is running on the service tier and not on the client if not specified differently during CREATE... ;-)
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
You can call a function on a subpage no problem. But you are not able to use the current record, selected or marked records in subpage when this function is invoked from parent page.
In the new architecture all of the application logic is executed on the server and to invoke this code the client calls the server with all the state of the current page but this doesn’t include records selected in subpages, factboxes etc.
You need to move this action from parent page (header) to the subpage:
- The intension is that all actions related to subpages should go into the lighting menu of the subpage and that works fine.
- The current version of the transformation tool should be able to move the action to the subpage automatically based on an existing Form and subform relationship.
If you would like to make the action more accessible you can add a shortcut to the action, like Dimensions (Shift + Ctrl + D) on the “Sales Order Lines”.
Do you have a special reason to place this action on the Header and not on lines?
/Marc
What if you change the shortcut key?
What if another action gets that shortcut key?
etc.
Group Program Manager, Client
Microsoft Dynamics NAV
http://blogs.msdn.com/freddyk
The information in this post is provided "AS IS" with no warranties, and confers no rights. This post does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion.
I want to put the function on the header because it looks much better and the user have to press a big button instead of having to go on the actions of the lines to call a function subform related....
I hope this limitation will be removed in the next version of NAV........
http://www.mibuso.com/dlinfo.asp?FileID=1123
In the current release of NAV 2009 (R2 6.0.33046.0) it is possible to call functions of the subpage in the mainpage. You can do so by using CurrPage.PAGENAME.FORM.FUNCTION.
Currently there is a sideffect using this solutions:
Example: Sales Header - Sales Line
Sales Line 1 - Item A - Qty 10
Sales Line 2 - Item B - Qty 5
After selecting Sales Line 2 and pressing a button in the the mainpage to call a fuction in the subpage, you won't find yourself on Record Sales Line 2 - instead the Rec will still be on Sales Line 1. If you press the Button in the mainpage a second time, the Record will be correctly on Sales Line 2.
One solution to fix this, is to use a (hidden) factbox (which is linked to the line-table) instead of the subpage. Just place the function into the factbox and call it in the mainpage. This works well - even when the fact box is not visible.