web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

MultiSelectLookup for a StringEdit control in MSDyn365Fo

(0) ShareShare
ReportReport
Posted on by 931

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.

*This post is locked for comments

I have the same question (0)
  • ThivaKar Profile Picture
    931 on at

    Hi All,

    Any suggestions...?

  • ThivaKar Profile Picture
    931 on at

    Any suggestions?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Joris dG Profile Picture

Joris dG 5

#2
Andrew Jones a1x Profile Picture

Andrew Jones a1x 2

#3
GL-01081504-0 Profile Picture

GL-01081504-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans