web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

Automatic rollup field recalculation and mass creation of records

(0) ShareShare
ReportReport
Posted on by 55

Hi,

I created a custom Project entity and a 1:n related ProjectTask entity and I added a rollup field "OpenTasks" to the Project entity. Because I want to see immediate updates of the rollup field, I added a plugin executing a CalculateRollupFieldRequest whenever a ProjectTask is created or updated. This is working fine.

But now I want to create/assign some ProjectTasks (based on some templates) automatically to the Project as soon as the Status changes to a specific value. Therefore I added another plugin for the Project entity and handle the Update message. Basically this is also working fine.

But of course with this setup, there are a lot of Create messages (for some projects there might be dozens of tasks) and the rollup field is refreshed very often. I guess performance-wise this is not a good idea. I think it would make to refresh to rollup only after all tasks are created. Is this somehow possible?

Are there other/better approaches to solve my requirements?

Thank you!

I have the same question (0)
  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Hello,

    There are multiple ways of implementing that requirement but the easiest as for me is to organize that recalculation using Async Plugin. That would not require changes in your current design and will offload all of work to AsyncService.

  • krombi Profile Picture
    55 on at

    I'm not sure I understand you correctly.

    Should I change my CalculateRollupFieldRequest plugin from sync to async?

    I'm currently not using QuickCreateForms for the ProjectTask entity, therefore with the sync plugin the new rollup value is immediately shown on the Project form (and I think there are also some JS solutions to refresh the Project form when using QuickCreateForms).

    If I change the plugin to be async, this does not work anymore and the user has to refresh the Project form.

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.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 107 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 92

#3
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 69 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans