mibuso.com

Microsoft Business Solutions online community
It is currently Wed May 22, 2013 11:39 pm

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: You Can't Call a function present on the lines of a Document
PostPosted: Tue Dec 02, 2008 3:48 pm 
Offline

Joined: Fri Dec 01, 2006 12:01 pm
Posts: 156
Location: London
Country: United Kingdom (uk)
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

_________________
Why don't you try my compare tool?
http://www.mibuso.com/dlinfo.asp?FileID=1123


Top
 Profile  
 
 Post subject: Re: You Can't Call a function present on the lines of a Document
PostPosted: Tue Dec 02, 2008 7:46 pm 
Offline
Microsoft employee

Joined: Thu Jan 24, 2008 2:21 am
Posts: 358
Location: MDCC
Country: Denmark (dk)
I can answer one of the questions (not that it will help you at all :( ): Yes, it is true for NAV 2009.
Whether this will change in the future, I can't tell - but I know that the Dev team has this problem on the radar.

_________________
Freddy Kristiansen
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.


Top
 Profile  
 
 Post subject: Re: You Can't Call a function present on the lines of a Document
PostPosted: Tue Dec 02, 2008 8:45 pm 
Offline

Joined: Fri Dec 01, 2006 12:01 pm
Posts: 156
Location: London
Country: United Kingdom (uk)
Ok Thanks... :(
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 :)

_________________
Why don't you try my compare tool?
http://www.mibuso.com/dlinfo.asp?FileID=1123


Top
 Profile  
 
 Post subject: Re: You Can't Call a function present on the lines of a Document
PostPosted: Wed Dec 03, 2008 9:54 am 
Offline
MVP Microsoft Dynamics NAV
NAV TechDays 2013 attendee

Joined: Thu Oct 16, 2003 8:50 am
Posts: 12265
Location: Brno
Country: Czech Republic (cz)
PureHeart wrote:
Ok Thanks... :(
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 :)


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... ;-)

_________________
Kamil Sacek
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.


Top
 Profile E-mail WWW  
 
 Post subject: Re: You Can't Call a function present on the lines of a Document
PostPosted: Wed Dec 03, 2008 4:30 pm 
Offline
Microsoft employee

Joined: Tue Dec 02, 2008 5:21 pm
Posts: 11
To add a bit more details to Freddy’s answer.

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

_________________
This posting is provided "AS IS" with no warranties, and confers no rights.


Top
 Profile E-mail  
 
 Post subject: Re: You Can't Call a function present on the lines of a Document
PostPosted: Wed Dec 03, 2008 5:45 pm 
Offline
Microsoft employee

Joined: Thu Jan 24, 2008 2:21 am
Posts: 358
Location: MDCC
Country: Denmark (dk)
Quote:
I Tried with a windows shell automation and the sendkeys command without any luck...
Do you think is possible?
An action on the main form with the following code
Code: Select all
CREATE(WshShell,TRUE,TRUE);
WshShell.SendKeys('+^D');
actually works fine - but it is kind of a hack.
What if you change the shortcut key?
What if another action gets that shortcut key?
etc.

_________________
Freddy Kristiansen
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.


Top
 Profile  
 
 Post subject: Re: You Can't Call a function present on the lines of a Document
PostPosted: Mon Dec 08, 2008 5:43 pm 
Offline

Joined: Fri Dec 01, 2006 12:01 pm
Posts: 156
Location: London
Country: United Kingdom (uk)
Well yes Freddy you are right but that would be true with every shortcut key...
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........

_________________
Why don't you try my compare tool?
http://www.mibuso.com/dlinfo.asp?FileID=1123


Top
 Profile  
 
 Post subject: Re: You Can't Call a function present on the lines of a Docu
PostPosted: Mon Mar 12, 2012 5:18 pm 
Offline

Joined: Thu Dec 27, 2007 10:41 am
Posts: 1
Location: Wiener Neustadt
Country: Austria (at)
Hello!

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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum


Search for:
Jump to: