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

Announcements

News and Announcements icon
Community site session details

Community site session details

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

Age Calculation Plugin Trigger

(0) ShareShare
ReportReport
Posted on by

Hello, 

I've created a C# plugin to calculate age based on a date of birth in my people table. 

I want to re-calculate age everyday, for every record in the table. 

Question is, what's the best way to fire this plugin?

Cerainly on create of the record. But how should i re-calculate?

I want to minimise calls to dataverse using power automate.

How can i trigger the plugin for each row everyday? It can't be triggered by a calculate column, and most records would not have daily changes. 

Should i refactor to the plugin to loop through all people records, updating each within the same plugin call? if so, how should i trigger this mass update?

Thanks!

I have the same question (0)
  • Suggested answer
    Adrian Begovich Profile Picture
    1,032 Moderator on at

    Hi alexiscool3104,

    Scheduled Power Automate flows are more suitable than plugins for implementing this requirement, but calculated fields are the best solution.

  • alexiscool3104 Profile Picture
    on at

    Thanks for your response!

    Calculated fields aren't an option for me, i need to the data to be completely accurate and reflective of western age format (round down).

    How would you suggest i use scheduled flows to trigger this plugin?

  • Suggested answer
    Adrian Begovich Profile Picture
    1,032 Moderator on at

    Hi alexiscool3104,

    I am not suggesting that you use scheduled flows to trigger your plugin, instead I am suggesting that you create a scheduled Power Automate flow that runs once a day. In the flow, get all users with a populated date of birth field, get the difference between the date of birth and the current date for each user, and then set the age field to the rounded down difference for each user.

    Alternatively, you can change the precision value of your field to 0 decimal places or wait for the release of formula columns.

  • Suggested answer
    ankit_singhal Profile Picture
    560 on at

    You can use the scheduled Power Automate and run once a day. Fetch a record list of your entity and apply your logic for calculation age. It will update age on all records every day.

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

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
Nagaraju_Matta Profile Picture

Nagaraju_Matta 102

#2
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 71 Most Valuable Professional

#3
Abhilash Warrier Profile Picture

Abhilash Warrier 66 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans