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
2021 Release Wave 1Discover the latest updates and new features to Dynamics 365 planned April 2021 through September 2021.
Release overview guides and videos Release Plan | Preview 2021 Release Wave 1 Timeline
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance and Operations TechTalks | Customer Engagement TechTalks | Upcoming TechTalks | All TechTalks
Hello everybody, I have created a DialogField lookup in RunBaseBatch:
sysTableLookup.addLookupField(fieldNum(AssociateDetails, AssociatedId), false); sysTableLookup.addLookupField(fieldNum(AssociateDetails, AssociateStatus), false); sysTableLookup.addLookupField(fieldNum(AssociateDetails, AssociateCategory), false); sysTableLookup.addSelectionField(fieldNum(AssociateDetails, RecId));
I need to get the RecId when lookup will be selected. How can I get this SelectedField?
You need to add sysTableLookup.addLookupField(fieldNum(AssociateDetails, RecId), true);.
Ok, but how can I get this value in Modified method? I'm using "AssociatedId" to filter, after that, I need RecId, but I have tried using valueStr, but I get only "AssociatedId".
Lookup always returns a value from one column. If you need to get RecId by AssociatedId, you need to get this data from DB.
So if you have AssociatedId in modified method, but you need RecId for the related record - you should use find method on AssociateDetails (you need to create it if it's a custom table and there are a lot of examples) or use select statements "select RecId from AssociateDetails where AssociateDetails .AssociatedId == AssociatedId:
Ok, I understood! However, I have several AssociatedId repeated in my search. That's why I search for AssociatedId and I want to get the RecI.
That suggestion worked! tks a lot!
Hi Danilo Prado,
To which AX/D365FO version is your question related?
Would be great if you could clarify.
Business Applications communities