How to fetch data in Part type page using a Query in NAV?

Wishing you all a happy and prosperous New year 2019!

Introduction:

First question is why query? Lets see the advantage of queries.

  1. First you can limit the amount of data you retrieve from the server by defining only the specific columns you need
  2. You can join multiple tables into one query saving loop code pattern.
  3. They are also light weight than Table Queries.

Below is the article which gives step wise procedure how to fetch data using a query and how to link it to a part page

Pre-requisites:

Microsoft Dynamics NAV 2017

Steps:

  • Create a table with a field Entry No with datatype as Integer as primary key.
  • I know what you are thinking… why a table ? A new table will cost me a customer licence but… hey! you would require a licence if you use it as a Temporary table. Yes, I’ll be using SourceTableTemporary property.
  • So here, I’ve created a table as below. This table will be used as a Buffer so don’t worry about the cost
table
  • Create a query using DataItem from where we will populate out temporary table.
  •  
  • Finally create a page with SourceTableTemporary property set as Yes.
Page Properties
  • Now, in my case I’m creating a this Part page for Page Purchase Order(50).So navigate to page 50 and add the part page as follows
Page 50
Page Link
  • A call is made to a function in our custom Page Test Page from Page 50. The call is written on the trigger OnAfterGetCurrRecord. Here in the function only top 6 records should be visible
Call
  • Now launch Microsoft Dynamics NAV RTC and navigate to purchase order click on edit button of Purchase Order. The Test page will be visible.
Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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