mibuso.com

Microsoft Business Solutions online community
It is currently Fri Oct 31, 2014 3:11 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Update Header page from Lines page using interoperability
PostPosted: Thu Oct 06, 2011 7:24 pm 
Offline

Joined: Fri Oct 29, 2004 9:23 am
Posts: 5
Country: Netherlands (nl)
Mark Brummel already wrote an example of this issue on his blog using an automation variable :
http://dynamicsuser.net/blogs/mark_brummel/archive/2009/12/16/tip-25-update-header-page-from-the-line-page.aspx

In the example below the SendWait function of System.Windows.Forms.SendKeys DoNet variabele is used.

Create a variable:
Code: Select all
SystemWindowsFormsSendKeys DotNet 'System.Windows.Forms, Version=2.0.0.0,  Culture=neutral,PublicKeyToken=b77a5c561934e089'.System.Windows.Forms.SendKeys


Create a function in a codeunit and call this function from your page:
Code: Select all
UpdatePageWithF5()
//Update a page
SystemWindowsFormsSendKeys.SendWait('{F5}');
SystemWindowsFormsSendKeys.SendWait('{F5}');


The reason for twice an 'F5' is that it does not update the main page first. First (and only) the fact boxes are updated.
As Mark also wrote: Be carefull with this hack since all flowfields are recalculated and there will be trafic to the SQL Box.


Top
 Profile E-mail WWW  
 
 Post subject: Re: Update Header page from Lines page using interoperabilit
PostPosted: Thu Mar 29, 2012 1:09 pm 
Offline

Joined: Thu Mar 10, 2011 2:03 pm
Posts: 80
Location: Kanpur
Country: India (in)
I've tried it in sales order page . I've made function in sales order sub form and put it to OnValidate trigger of Unit Price Incl all taxes of sales order subform page. but it's not working.
It works when i minimize and maximize the form or when i push the f5 button twice.

I want that it updates the header after moving to the next field.

PLZ Help.

_________________
Sharad Gupta
Navision Technical Consultant & .Net Developer


Top
 Profile E-mail  
 
 Post subject: Re: Update Header page from Lines page using interoperabilit
PostPosted: Mon Jul 08, 2013 12:24 pm 
Offline

Joined: Tue Dec 08, 2009 10:40 am
Posts: 60
Location: Hoorn, The Netherlands
Country: Netherlands (nl)
Shouldn't you use RunOnClient = Yes for the DotNet?


Top
 Profile E-mail WWW  
 
 Post subject: Re: Update Header page from Lines page using interoperabilit
PostPosted: Fri Oct 11, 2013 12:38 pm 
Offline

Joined: Mon Nov 22, 2004 12:02 pm
Posts: 63
Location: Cologne
Country: Germany (de)
Sorry, but I've tried to use this logic with NAV 2013 and it didn't work.
(including the "run on client" option in the automation variable property)
What can be the reason for this?


\:D/

I've found the solution:
I used "send" instead of "sendwait" and it worked fine.

_________________
Rallnus (Yamaha FJ1200 - '89 / 25th anniversary was great!)


Top
 Profile  
 
 Post subject: Re: Update Header page from Lines page using interoperabilit
PostPosted: Wed Aug 13, 2014 12:27 pm 
Offline

Joined: Mon Sep 29, 2008 6:02 am
Posts: 51
Hi Rallnus :) ,

I was trying to work in Nav 13 r2 with this code. I have tried both Send and SendWait methods. But got error for both the Methods.

UpdatePageWithF5()
//Update a page

SystemWindowsFormsSendKeys.SendWait('{F5}');
SystemWindowsFormsSendKeys.SendWait('{F5}');

Error with SendWait
Microsoft Dynamics NAV
---------------------------

A call to System.Windows.Forms.SendKeys.SendWait failed with this message: Access is denied
---------------------------
OK
---------------------------

Error with Send
Microsoft Dynamics NAV
---------------------------

A call to System.Windows.Forms.SendKeys.Send failed with this message: SendKeys cannot run inside this application because the application is not handling Windows messages. Either change the application to handle messages, or use the SendKeys.SendWait method.
---------------------------
OK
---------------------------
I am using the application in Windows 7 -64 Bit operating system.
Is there any problem with my code? :?:
how to define RunOnClient = Yes for the DotNet?. Please guide me. Thanks [-o<


Top
 Profile E-mail  
 
 Post subject: Re: Update Header page from Lines page using interoperabilit
PostPosted: Thu Aug 21, 2014 9:19 pm 
Offline

Joined: Tue May 20, 2014 4:37 pm
Posts: 14
Country: United States (us)
RunOnClient is on the properties


Top
 Profile E-mail  
 
 Post subject: Re: Update Header page from Lines page using interoperabilit
PostPosted: Fri Aug 29, 2014 7:58 am 
Offline

Joined: Sat Dec 23, 2006 1:32 am
Posts: 205
Location: Malacanang
Country: Philippines (ph)
Hi All,

how about using web client? is there a way to update the header from lines?I'm looking for a solution but can't find one, Please share if you already did this. Thanks in advance. :)

Regards,

_________________
Sendoh
be smart before being a clever.


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

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


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: