Quantcast
Channel: Microsoft Dynamics AX Forum - Recent Threads
Viewing all articles
Browse latest Browse all 72043

MultiSelectLookup for a StringEdit control in MSDyn365Fo

$
0
0

Hi All,

In AX 2012 we create multi-select lookup for a control using  SysLookupMultiSelectCtrl class for example tutorial_LookupMultiSelectGrid form. I have tried the same in D365 for the string edit control using OnLookup event but the selected values not shown in the string-edit. Here is my code...

[FormControlEventHandler(formControlStr(SysDocuBrandDetails, SysDocuBrandDetails_CompanySelection), FormControlEventType::Lookup)]
public void SysDocuBrandDetails_CompanySelection_OnLookup(FormControl sender, FormControlEventArgs e)
{
 SysLookupMultiSelectCtrl msCtrlCust;
container controllookup;

FormStringControl stringControl = sender.formRun().design().controlName('SysDocuBrandDetails_CompanySelection') as FormStringControl;

FormRun formRun = sender.formRun();

Query query = new Query();

QueryBuildDataSource qbds;

qbds = query.addDataSource(tableNum(CompanyInfo));

// qbds.fields().dynamic(NoYes::Yes);

qbds.fields().addField(fieldNum(CompanyInfo,DataArea));

qbds.fields().addField(fieldNum(CompanyInfo,Name));

//assigning control and query to the class

msCtrlCust = SysLookupMultiSelectCtrl::constructWithQuery(formRun, stringControl, query, false, controllookup );

}

Please tell me why it is not working in D365 whereas it is working fine in AX 2012.


Viewing all articles
Browse latest Browse all 72043

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>