mibuso.com

Microsoft Business Solutions online community
It is currently Wed Jun 19, 2013 10:24 pm

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Change page from Add in
PostPosted: Wed Jul 18, 2012 6:16 pm 
Offline

Joined: Thu Jun 07, 2012 1:33 pm
Posts: 21
Country: United Kingdom (uk)
We have a custom RTC add in (a schedule control) and need to be able to navigate to another page from it (for instance, when the user wants to view appointment data).

Currently I'm creating a new process with a file name that reads something like this "DynamicsNAV://server/service/company/runpage?page=50100&bookmark=MyBookmarkKey"
However, this is opening a new copy of the RTC, and is causing us issues.

We need to be able to navigate to a different page in the same copy of the RTC from inside a custom add in.

Can someone explain how my C# add in can send a command back to the RTC and tell it to navigate to a different page?

Thanks.


Top
 Profile E-mail  
 
 Post subject: Re: Change page from Add in
PostPosted: Wed Jul 18, 2012 8:18 pm 
Offline
MVP Microsoft Dynamics NAV

Joined: Wed Dec 15, 2004 6:11 pm
Posts: 8732
Location: 3rd rock from sun
Country: United States (us)
There is a trigger on NAV page called OnControlAddIn (Index, Data)

You can call that from C# and pass values and in NAV add code to this trigger to open the required page.

Your code in C# will look something like this

this.RaiseControlAddInEvent(index, data);



In NAV you can add code
if Index is 10, then
Page.runmodal(10);

_________________
Rashed.

blog: http://mibuso.com/blogs/ara3n/


Top
 Profile  
 
 Post subject: Re: Change page from Add in
PostPosted: Wed Jul 18, 2012 8:28 pm 
Offline
MVP Microsoft Dynamics NAV

Joined: Wed Dec 15, 2004 6:11 pm
Posts: 8732
Location: 3rd rock from sun
Country: United States (us)
By the way in NAV 2013 you can create your own custom events and they will appear in NAV as triggers and do much more with that.

_________________
Rashed.

blog: http://mibuso.com/blogs/ara3n/


Top
 Profile  
 
 Post subject: Re: Change page from Add in
PostPosted: Thu Aug 02, 2012 5:46 pm 
Offline

Joined: Thu Jun 07, 2012 1:33 pm
Posts: 21
Country: United Kingdom (uk)
Excellent. Thanks for your help. This worked a treat.


Top
 Profile E-mail  
 
 Post subject: Re: Change page from Add in
PostPosted: Fri Aug 03, 2012 7:42 am 
Offline

Joined: Mon Sep 08, 2008 10:25 am
Posts: 499
Location: Switzerland
Country: Switzerland (ch)
If you use a linklabel in your addin you just can use your link that you created, no need to create a new process and run that. that works fine and opens in the same instance.

_________________
My Blog


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

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 12 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: