Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Suggested answer

Rollup filter where activity owner is account owner

(0) ShareShare
ReportReport
Posted on by 240

Hello, 

I have a rollup of activity on account table. And these rollups are for viewing last and next activity on the account form. Is there anyway to filter the rollup to only those activities where the activity owner = Account owner. 

I am thinking if I can create a boolean field on all activity tables - phone call/task/appointment etc which would toggle to Yes by a workflow when the activity owner is equal to the account owner (which would be the regarding field) - But I don't know if it would be possible to carry these Yes toggles to the activity pointer since that is the related table on the rollup calculation. 

Any ideas?

Thank you. 

  • Suggested answer
    Wahaj Rashid Profile Picture
    11,321 on at
    RE: Rollup filter where activity owner is account owner

    Hi,

    Thank you for your query.

    As per my understanding, this is a hard problem.

    If you add a two-options field on the Activity, it is almost impossible to update (toggle) this using a workflow / flow or even a plugin. You cannot trigger any process or plugin on the activity table.

    If you add this flag in underlined activity (like Task, Phone Call, Email, etc.), you cannot role it up on Activity Level.

    So my suggestion would be:

    • Instead of using Roll-up, write your own logic using a plugin.
    • Let this plugin execute on create/update of:
      • Task
      • Phone Call
      • Email
      • Appointment

    (or whatever activities are being used)

    • Get reference of Regarding Account.
    • Retrieve Multiple - All Activities related to this account and get the Last and Next activity date (aggregations).
    • Update these fields on Account (simple fields not roll-up).
  • Aneeqa Pervaiz Profile Picture
    240 on at
    RE: Rollup filter where activity owner is account owner

    Hey Lu Hao.

    I need to add a filter somehow that only those activities are included where the activity owner = Account owner. 

    Which brings me to the first part of the question, How do I add a filter to the activity pointer somehow. I was thinking I could add a toggle (Y/N) on all activities (My client uses only 4 - so that is okay) - Once the created activity owner = regarding account owner, then that toggle would set to Yes. But how can I set this toggle in activity pointer itself so that I can add a filter in rollup. 

    Looking forward to your reply. 

    Thanks.

  • LuHao Profile Picture
    40,886 on at
    RE: Rollup filter where activity owner is account owner

    Hi Aneeqa,

    Can you elaborate on "But I don't know if it would be possible to carry these Yes toggles to the activity pointer since that is the related table on the rollup calculation"?

    In addition, in order to better understand your needs, can you tell me how the rollup of activity in the Account form is created?

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,430 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 233,043 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Product updates

Dynamics 365 release plans