Ax 2012 ListPage opened in a new window.

Hi!

How can a ListPage be opened by menu item / button in a new window and not in content area ?

Thank You!

Yes, you can do it with a trick! (And the filter bar will be there)

-First, set Style property to AUTO in the design of your form.

-Overwrite the run method of the form and put this line below the ‘super();’

this.design().style(4);

-Now, call again the ‘super()’;

That do the trick, you will end with a code like this:


super();

this.design().style(4);

super();


Why this works? When you call the first super() the form is opened in normal format. (Super calls the AUTO style property) then, you are changing the style to a ListPage (the number 4) and finally, with the second super() you are updating the same form, converting it into a listpage in running time.

You can do this with other properties too.

Nice coding! :smiley:

CrazyFear

I was trying to use H. Jay S. trick but it does not work for me. I done something similar.

I have form that normally open in same window (as list pages do normally). But from some menuitems it opens in new window (they have parameters seted to new).

I overwrite init() on form

if(element.args().parm()==“new”)

{

element.form().design().style(0);

}

super();

Set the style property of the design node of a form to “Simple List” or “Dialog”.