How can I Drill Down to any Page dynamically using Table ID

There is a requirement from my one of my reader.

Today I will discuss on how we can dynamically open page by using table ID only.

As you are aware to open Page we require PageID and Table record.

PAGE.RUN(Number [, Record] [, Field])

For this we will use RecordRef and minimum requirement is table have Page ID for Lookup and Drilldown defined else we will get error when try to open the page.


Create a Function name it say ShowRecords.

Define 2 Variables as:

Name rRef

DataType RecordRef

Name varRecRef

DataType Variant


We require VARIANT because PAGE don’t accept RecordRef datatype.

PAGE.RUN(Number [, Record] [, Field])

Also define Parameter to the function to receive Table ID.


In function you write below code:




//rRef.OPEN(No [, Temp] [, CompanyName])


//You can apply filters also if required before accessing the Page

varRecRef := rRef;

//PAGE.RUN(Number [, Record] [, Field])



Now where you require you can call your function as ShowRecords(18)

This will Open Customer List Page to show the records from table.

I will show good use of same in my upcoming post. One use can be to design Navigate Page but few limitations will apply, wait for my next post.


That’s all for this post, I will come up with more details in my upcoming posts, till then keep exploring and learning.



Comments are closed.


Most of the contents you find in this blog will be either inherited from MSDN or Navision Developer IT Pro Help. Some places images are also directly taken from these sites. Purpose is simple to try those stuffs and re-produce adding few things as per my understanding to make easy understanding for others and quick reference.

Here nothing under my own brand or authorship of the content. At any point of time we are just promoting Microsoft stuffs nothing personnel with same.

Hope stuffs used here will not violate any copyright agreement with them. In case by mistake or in-intestinally it happens and the Microsoft feels these should not be used Microsoft have full right to inform me about same and will be glad to take down any such content which may be violating the norms.

Purpose is to promote Navision and share with community.

FB Profile

Like FB Page

%d bloggers like this: