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,...
Answered

Two step calculations within a plugin

(0) ShareShare
ReportReport
Posted on by 1,799

Hi, 

We're using business rules to run a number of calculations on an entity. A number of the calculations are dependent on other calculations completing first: 

e.g.

c = a + b

d = c - e

In this example, c must first be calculated before the second calculation can take place. At the moment, using business rules, this requires us to save the Record twice. The result of the first calculation must be committed to the db before the second calculation can run. 

If we replaced our business rules with a c# plugin, would the behavior still be the same? Or would we be able to complete both of the above calculations in one plugin trigger?

I have the same question (0)
  • Verified answer
    Kipetcoff Profile Picture
    1,037 on at

    Hi,

    In plugin you can replace this d = c - e with this d = (a + b) - e

  • David L. Carr Profile Picture
    75 on at

    Hi JM,

    While Business Rules are easy to build, unfortunately you don't have control over when they run.  In fact, they run in order of when the rules were published to the system, so you may be able to get what you want by publishing those rules in order.  But the best solution is to write some JavaScript, as you CAN control the order of events there.

    Hope this helps,

    Dave

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!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Hamza H Profile Picture

Hamza H 142 Super User 2026 Season 1

#2
Nagaraju_Matta Profile Picture

Nagaraju_Matta 128

#3
11manish Profile Picture

11manish 121

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans