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

Service class to get the selected record and deleted matching records and refresh the form data source in D365 F&O

 [DataContractAttribute] class ABCUserProfilesBulkDeleteContract {         UserId userId;     [DataMemberAttribute('UserId')]     pu...