2 min read

X++ Chronicles : How to use JumpRef feature in Dynamics Finance

X++ Chronicles : How to use JumpRef feature in Dynamics Finance
Photo by Joshua Reddekopp / Unsplash

While searching for a method to implement the ‘Go to main table’ functionality I found an easy way to develop it using ‘jumpRef’.

The jumpRef method, known as “View Details”, is frequently used to create a reference from within a table record to another one allowing navigation between tables in a single click.

There are three different ways in which you can use jumpRef:

1. Extended Data Type (EDT) Reference Table

View Details and Lookup behavior for unbound controls (a form control that is not bound to a table field, but has its EDT property set) is given by their EDT settings Reference Table and Table References.

EDT’s Reference Table property specifies the table that is referenced by the EDT, and which has the primary key referenced by this EDT.

Location: Table properties -> “Data” category -> Reference Table

Whenever setting the EDT Reference Table property, the core type of the EDT must match the type of the Primary Key on the Reference Table.

For more information please visit the following link: https://docs.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/user-interface/lookups-controls

2. Extended Data Type (EDT) Reference Table

Specifies the form that will be open through the display menu item when a table is referenced.

If the property value is not filled in when the user access the view details option on the table, the system will try to display a form with the same as the table.

Location:  Table properties -> “Data” category -> Form Ref (see the below image).

You can find more about this here: https://docs.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/lifecycle-services/ax-2012/table-properties

3. JumpRef method

 This is a simple example of using the jumpRef method inside a form (NoticesClassification). We will just override the jumpRef method from a grid’s string control (NoticesClassification_NoticesId).   

[Control("String")] 
class NoticesClassification_NoticesId 
{ 
    public void jumpRef() 
    { 
      //1. create Args instance to pass arguments (caller, in this case) between application objects. 
      Args args = new Args(); 
      // 2. sets the instance of the object that created this instance of the args class 
      args.caller(element); 
      // 3. set menuFunction to the menu item that would be called and call the menu item with args   
      new MenuFunction(menuitemDisplayStr(NoticesClassification), MenuItemType::Display).run(args); 
    } 
} 

Thanks for reading this article, hope it was helpful 😊. If you have any questions please leave a comment below.