The views and opinions expressed in this blog are those solely of the author(s) and do not necessarily reflect Microsoft’s current policy, position, or branding. For official announcements and guidance on Dynamics 365 apps and services, please visit the Microsoft Dynamics 365 Blog.
Personalized Community is here!
Quickly customize your community to find the content you seek.
Choose your path Increase your proficiency with the Dynamics 365 applications that you already use and learn more about the apps that interest you. Up your game with a learning path tailored to today's Dynamics 365 masterminds and designed to prepare you for industry-recognized Microsoft certifications.
Visit Microsoft Learn
2020 Release Wave 2Discover the latest updates and new features to Dynamics 365 planned through March 2021.
Release overview guides and videos Release Plan | Preview 2020 Release Wave 2 TimelineWatch the 2020 Release Wave 1 virtual launch event
Ace your Dynamics 365 deployment with packaged services delivered by expert consultants. | Explore service offerings
Connect with the ISV success team on the latest roadmap, developer tool for AppSource certification, and ISV community engagements | ISV self-service portal
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance TechTalks | Customer Engagement TechTalks | Upcoming TechTalks
The post Using Multi-Select Lookup Control in Microsoft Dynamics AX 2012 appeared first on Dynamics 101.
Lookups are used to select values for a control in Microsoft Dynamics AX. The values can be records from a reference table or from multiple data sources in Microsoft Dynamics AX.
The lookup form is opened whenever the lookup button is pressed by a user on any field in Microsoft Dynamics AX. There are multiple methods to create a lookup form. This tutorial will discuss a method to create a lookup form in which multiple values can be selected for a single control.
As part of this tutorial, the user will be able to select multiple customers from a single lookup
Query query = new Query();
//creating query to show customer account and customer name
//the query must contain only those fields that should be visible on the lookup
qbds = query.addDataSource(tableNum(CustTable));
qbds = qbds.addDataSource(tableNum(DirPartyTable));
//assigning control and query to the class
msCtrlCust = SysLookupMultiSelectCtrl::constructWithQuery(element, MultiLookup, query);
container values = msCtrlCust.get(); // get the rec Ids of the Cust table. To get the display value, use the getSelectedFieldValues method
//loop through the container and show the selected Ids in the info log
for (i = 1; i <= conLen(values);i++)
Note: To remove the selected record(s), they need to be unchecked on the lookup. The Customers field will become non-editable when associated with the multi-select lookup control and hence, no change can be made on the field
Business Applications communities