Change page from Add in

KarlRhodesKarlRhodes Member Posts: 37
edited 2012-08-03 in NAV Three Tier
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.

Comments

  • ara3nara3n Member Posts: 9,256
    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);
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • ara3nara3n Member Posts: 9,256
    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.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • KarlRhodesKarlRhodes Member Posts: 37
    Excellent. Thanks for your help. This worked a treat.
  • deV.chdeV.ch Member Posts: 543
    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.
Sign In or Register to comment.