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 1 Discover the latest updates and new features to Dynamics 365 planned through September 2020
Release overview guides and videos Release Plan | Preview 2020 Release Wave 1 Timeline
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
I want to get the total no of records in subgrid on page load and when
any record gets added to subgrid. Dynamics CRM(8.2 online)
How about you use a simple rollup field to count child records?
let me know if its something you aint looking for.
NOTE : i tried "Xrm.Page.getControl("ZipcodeGrid").getGrid().getTotalRecordCount();" code on editable subgrid and it was not working so i posted the question, then i removed the editable subgrid and used nornal grid and it was working with this code "Xrm.Page.getControl("ZipcodeGrid").getGrid().getTotalRecordCount();"
Hope this helps someone!!!
//below is the function
var zipcodeSubgridCount = Xrm.Page.getControl("ZipcodeGrid").getGrid().getTotalRecordCount();
Hi Shahbaaz ,
You can call REST API , to get the subgrid data using entity id , I think this is better way to get the total record count .
Thanks for the suggestion, i want to trigger plugin as soon as the i add record in subgrid, will it work with rollup field? because rollup fields are calculated via an Async Process so this might take time.
Can you try a single plugin on association and disassociation message to populate both count and other operation you want to do on count field change.
Associate and disassociate message has been deprecated from crm 2013(please correct me if I'm wrong).
No it is not deprecated you can find it in version 8.2 sdk message excel.
If the relationship is n: n then use this otherwise create and delete message on sub grid entity will work.
Business Applications communities