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
Welcome to the Power Guide Mentorship Program. Today I am going to share PowerGuideTip19, where I will teach you, how can you calculate the count of CDS records.
There are many business requirements, where you have to perform the logic based on CDS/Dynamics 365 record count.
For Example- Retrieve Contact where the email address is firstname.lastname@example.org. If count is 0, return no contact found, if the count is 1, return contact exists, if the count is greater than 1 then return duplicate email found. Now, based on the return value you may have to perform various logic in PowerApps, Portals, SharePoint, etc
Let's see how this can be achieved.
Step 1- Initialize a variable to store Contact Record Count
Step 2- Retrieve Contact from CDS where email equal to 'email@example.com'.
I have hardcoded the email address in the fetch XML itself, however, you can pass it's value dynamically based on your business need.
Step 3- Calculate the Count/Length of all retrieved contact records.
Use the following expression to count the length of all retrieved contact records
Here 'Get_Contact' is the name of the previous step. If your previous step name is Get Account Records then you have to change this value to 'Get_Account_Records'.
Note: Space must be replaced with an underscore
Step 4- Use Count in Condition and Perform your logic accordingly
Step 5 - Test the Flow
Business Applications communities