Notifications
Announcements
No record found.
Hello,
We need to pull all leads with only one task assigned. It looks Advanced find can't do the job. Is there any way can I get the results?
Thanks
carys
Hi Carys,
Yes, you can create Rollup Field as shown below on Lead entity to store the Related Task Record Count:Then in Advance Find of Lead you can use this the above Rollup Field As shown below:<fetch> <entity name="lead" > <attribute name="subject" /> <filter> <condition attribute="new_taskcount" operator="eq" value="1" /> </filter> </entity></fetch>Here, We need add one more additional logic about task create/delete. Means, whenever task deleted or created we need to update the New Rollup Fields using below code://rollup fieldnamestring fieldName = "new_taskcount"string entLogicalName = "lead";Guid recordId = "<GUIDOFLEAD>";var rollupObj = new CalculateRollupFieldRequest {Target = new EntityReference(entLogicalName, recordId), FieldName = fieldName};var result = (CalculateRollupFieldResponse)service.Execute(rollupObj);Thanks,Pradeep.Please mark this as VERIFIED it it helps.
Thanks a lot!
you're welcome.
Thanks,
Pradeep.
Hi, here additional documentation of suing rollups in Dynamics
On-prem:
Create rollup fields in Dynamics 365 Customer Engagement (on-premises) | Microsoft Docs
Power Apps:
Define rollup columns with Power Apps - Power Apps | Microsoft Docs
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Tom_Gioielli 108 Super User 2025 Season 2
Jimmy Passeti 50 Most Valuable Professional
Gerardo RenterÃa Ga... 49 Most Valuable Professional