Jumpref in AX 2012

Hi All,

We all know about “View Details” Option in our Ax 2012 Forms and Tables.
Here I wrote one sample for how to get that functionality in our forms or table.
This is done by three ways:

1) By EDT Relations

2) By using JumpRef method

3) By using FormRef property in Table

EDT Relations:

If you use an EDT in tables which have relation with some other table fields, that time you can able to navigate the main table or main form.

FormRef Property:

Select the Table and go to properties and select the required form in the FormRef property.

JumpRef method:

If you are not having that option, simply write an override the JumpRef method in a field of DataSource or in a Form Control. Here I show you a sample jumpRef method code:

public void jumpRef()
{

Args            args;
;

args = new Args();
args = new Args(menuFunction.object());
args.caller(element);
args.record(“RecordName”); // to be a datasource which added in the current form
new MenuFunction(menuitemDisplayStr(“FormName”), MenuItemType::Display).run(args);

}

In the form init() which we called here, we have to check the condition whether the form is called by any dataset or not.

E.g.,

public void jumpRef()
{

Args args = new Args();
SalesTable salesTable;
;

args.caller(this);
salesTable = SalesTable::find(SalesLine.SalesId);
Args.record(salesTable);
new MenuFunction(menuitemdisplaystr(SalesTable), MenuItemType::Display).run(args);

}

Thanks & Happy DaXing….

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

%d bloggers like this: