In this article, we are going to talk about the "Promoted" actions feature. It allows users to easily access the main functions related to the active page. When we use pages without subpages, we can promote any function we want. The challenge arises when using subpage functions - where from the main page you can't get to the active subpage record.  (When you call the subform function in the Classic client, the Microsoft Dynamics NAV knows on which record the user stays, but in the RTC it doesn't work this way).

At 1ClickFactory we found a way to solve this issue - to promote actions that need subpage functions -- by using Parts (fact boxes). When you use parts, you can link them with lines subpages. The example we are going to present in this article is based on the standard Microsoft Dynamics NAV 2009 SP1 W1 version.

In this case we'll use the Sales Quote page, which has a few parts like "Customer Sales History," "Sales Line Details" and others. We need a part that is linked with a sales quote line subpage so we will use "Sales Lines Details." So how do you link the part with the subpage? We recommend using the parameters "ProviderID" and "SubFormLink."

Then you need to create a new function called "GetLineRecord" in the page "Sales Line FactBox."

Now let's check what we can get in our sales quote document. We will edit page 41 "Sales Quote."

Assign name "SalesLineFactBox" to "Sales Line FactBox" part.

And change parameter "Visible" from "TRUE" to ShowSalesLineFaxtBox (new global variable).

Now create Action button called "Show Me Line No." and promote it.

In this action button write the following code:

If we press on this promoted action button, we will get sales line number.

This is only an example of how we can find which record in subpage line is active. Good luck using it!