07 December 2010

Table Fields in Form Lookup / UtileElements

Table Fields in Form Lookup

Form->DS->Field->Method-> lookup()

public void lookup(FormControl _formControl, str _filterStr)
{

SysTableLookup sysTableLookup = SysTableLookup::newParameters(Tablenum(Utilelements),_formControl);
Query query = new Query();
QueryBuildDataSource QBDS;
;
SysTableLookup.addLookupfield(fieldnum(Utilelements,name));
QBDS = query.addDataSource(Tablenum(Utilelements));
QBDS.addRange(fieldnum(utilelements,recordtype)).value(queryvalue(UtilelementType::TableField));
QBDS.addRange(fieldnum(Utilelements,ParentId)).value(queryvalue(tablenum(ClinicalMaster)));

sysTableLookup.parmQuery(query);
systableLookup.performFormLookup();

//super(_formControl, _filterStr);

}

1 comment:

  1. Hi,
    I am new in Dynamics AX.I have one problem now with AX 2009.
    I have a grid with itemId lookup ,when i select itemid i need automatically fill itemname also.How can i do that??Plz help me..Thanx in advance

    ReplyDelete

Give me the commetns and solutions

How to add the Display method in the form level in D365 F&O

 The below examle is to add the form -Data source level adding display method and assigning to form design control.