Dynamics Ax 2009 - how to make a Tree lookup

Hi everyone .İ have a question.When i clicked this Açıklama column i need a lookup like tree.İ make a tree form named AlbArchiveFileTable in right pictures.But i dont know hot to get this tree like a lookup.(left pictures -Açıklama column)

7206.220.png <<-- 5822.221.png

Thank you for helping.

step

  1. create a new form in AOT(your form name)

  2. Set Design properties

Frame : Border

WindowType: Popup

  1. Add a new Tree Control to form’s design

Properites-> Name-> ModelTree

  1. Add the following line to form’s class declaration

BudgetModelTree bugetmodeltree;

  1. override the form’s init()

public void init()

{

FormStringControl callingControl;

;

callingControl = SysTableLookup::getCallerStringControl(

this.args());

super();

budgetModelTree = BudgetModelTree::construct(

ModelTree,

callingControl.text());

budgetModelTree.buildTree();

}

  1. Override mouseDblClick() and mouseUp() of the ModelTree control:

public int mouseDblClick(

int _x,

int _y,

int _button,

boolean _ctrl,

boolean _shift)

{

int ret;

;

ret = super(_x, _y, _button, _ctrl, _shift);

element.closeSelect(

this.getItem(this.getSelection()).text());

return ret;

}

public int mouseUp(

int _x,

int _y,

int _button,

boolean _ctrl,

boolean _shift)

{;

super(_x, _y, _button, _ctrl, _shift);

return 1;

}

This

Hi.İ have a mistake in step 4.BudgetModelTree is a class? i cant see Class,Form ,Tables like BudgetModelTree.İ have an error in class decleration.My ax version is 2009.

1385.222.png

This Class is created by User either your create procedure for tree lookup then you follow remaining step…or pls refere the following link

http://www.axaptapedia.com/Tree_Lookup

Hi.Thank you for reply.İ make the lookup tree.But how can i call the form in a field?

other lookup called like in dynamics ax 2009 like this,

public void lookup()

{

TableName.lookupName(this);

}

but tree lookup form i dont know how to call in a field.