Dynamics NAV: How To Run Objects From RTC (Role Tailored Client)

29 Aug

In the pre RTC versions of Dynamics NAV it was really simple to run/view objects from the client. Nowadays when we are using RTC it is not quite that simple since by standard we don’t have object designer in RTC (Role Tailored Client). At least yet 🙂

But there is a trick that you can use to achieve this. You need to create a page on the table object. After that add a button that runs the current record. Microsoft described this a couple of years ago in a blog post (How to start any object in Role Tailored Client)

But how about tables and querys?

If we look at our run function it will look something like this

Unfortunately we don’t have anything for tables 😦
But after reading the blog post Creating URLs to Microsoft Dynamics NAV Clients I found some new possibilities.

The URL builder function, GETURL, is released in Microsoft Dynamics NAV 2013 R2 to reduce coding time for developers who need to create various URL strings to run application objects in either the win client, the web client, or on web services. In addition, the GETURL function makes multitenancy features more transparent to C/AL developers.

Ok, so this is a 2013 R2 feature to begin with. What options do have with this function?

The format is:
[String :=] GETURL(ClientType[, Company][, Object Type][, Object Id][, Record])
Source: MSDN

“Object Type” sounds nice 😉 And if we go back to the Dynamics NAV blog we can see following examples:

GETURL(CLIENTTYPE::Windows,COMPANYNAME,OBJECTTYPE::Table,27) dynamicsnav://MyServer:7046/DynamicsNAV71/CRONUS/runtable?table=27

GETURL(CLIENTTYPE::Windows,COMPANYNAME,OBJECTTYPE::Page,27) dynamicsnav://MyServer:7046/DynamicsNAV71/CRONUS/runpage?page=27

GETURL(CLIENTTYPE::Windows,COMPANYNAME,OBJECTTYPE::Report,6) dynamicsnav://MyServer:7046/DynamicsNAV71/CRONUS/runreport?report=6

GETURL(CLIENTTYPE::Windows,COMPANYNAME,OBJECTTYPE::Codeunit,5065) dynamicsnav://MyServer:7046/DynamicsNAV71/CRONUS/runcodeunit?codeunit=5065

GETURL(CLIENTTYPE::Windows,COMPANYNAME,OBJECTTYPE::Query,9150) dynamicsnav://MyServer:7046/DynamicsNAV71/CRONUS/runquery?query=9150

GETURL(CLIENTTYPE::Windows,COMPANYNAME,OBJECTTYPE::XmlPort,5150) dynamicsnav://MyServer:7046/DynamicsNAV71/CRONUS/runxmlport?xmlport=5150

So let us use this information together with the function HYPERLINK and extend our run function to

    PROCEDURE Execute@1000000000();
      CASE Type OF
        Type::Page : PAGE.RUN(ID);
        Type::Codeunit : CODEUNIT.RUN(ID);
        Type::Report : REPORT.RUN(ID);
        Type::XMLport : XMLPORT.RUN(ID);

After a quick try it works! 🙂

However, this scenario only works when you are within the same domain as the NAV server. So when you are connected remotely to another domain via ClickOnce or normal client you need to take care of the MyServer issue. (dynamicsnav://MyServer:7046/DynamicsNAV71)

Microsoft writes the following about this:

Public\external endpoints may differ from internal addressing. For example, an external port number could map to a different internal port number, or you may be using a domain name to identify your Microsoft Dynamics NAV server. In such cases, the Microsoft Dynamics NAV server instance cannot automatically identify your network configuration settings.

To solve this problem, find the server instance configuration file and update the configuration keys for base URLs, such as the following key:

<add key=”PublicWebBaseUrl” value=”” />

You can set a Base URL for the Windows client, the web client, as well as SOAP and ODATA services, each independently. For example, you could set the Web Client Base URL to “…/”. From this point forward, the GETURL function will return URLs starting with this base address that you have specified.

Happy running objects! 🙂


Posted by on 2015-08-29 in Okategoriserade


Tags: , , ,

2 responses to “Dynamics NAV: How To Run Objects From RTC (Role Tailored Client)

  1. Tomas

    2015-09-28 at 11:34

    This is cool 🙂



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Mark Brummel Blog | Microsoft Dynamics NAV

Master Classes Design Patterns and more...

ideas in the cloud

Goprowe AB

Reflections from the ERP field

ArcherPoint Developer Blog

Reflections from the ERP field

The NAV Viking´s Blog

- Sharing my experience in the Dynamics NAV world

Comments for waldo's blog

Reflections from the ERP field

Nav Can Be Fun

Its Really Fun to Work with Microsoft Dynamics Nav / D365 Business Central


Reflections from the ERP field


Tips, Tricks, How-To's & News about Microsoft Dynamics NAV & Dynamics 365 for Financials

Kine's Info

Reflections from the ERP field

Just another site

NAV/SQL Performance - My Two Cents

Reflections from the ERP field – Applied Hacking

Reflections from the ERP field

Kauffmann @ Dynamics 365 Business Central

Reflections from the ERP field

Kriki’s Dynamics NAV blog

Reflections from the ERP field

Rashed Amini

Reflections from the ERP field

Olof Simren - Microsoft Dynamics NAV Blog

My blog about Microsoft Dynamic NAV tips and tricks. Remember to Subscribe!

Van Vugt's dynamiXs

Reflections from the ERP field

Navisionary – Dynamics NAV

Reflections from the ERP field

%d bloggers like this: