Hi,
I want a way to calculate points, each invoice with an amount of 100$ = 1 point
any idea please.
*This post is locked for comments
I have the same question (0)Hi Happyman,
Before I offer the two ways this can be done, I will make the following assumptions:
Security permissions = I assume you have been given system admin / system customizer roles in order to complete this requirement.
Invoices = are standard invoices in Dynamics 365 / Microsoft CRM
Customer = account only for this scenario, but can be any other entity depending on who the invoice is associated too.
You could complete this requirement in two ways:
1st
Create a custom workflow that when an invoices status is changed or the amount field contains data (depends on when you would want to trigger the workflow), increment a new field on the account by a value dependent on the amount on the invoice. I.e. 200$+ = 2 points, 100-200$ = 1 point etc.
You can use the same workflow to decrease the points if the invoice is cancelled or deleted at any point.
2nd
You can use a a roll-up field to do a count of the number of invoices that fall within a certain value.
(seen in this video: www.youtube.com/watch)
Then add in an Entity level business rule or calculated field that sums up all the points associated to the roll-up field(s).
The calculated field could work better as it can manipulate the values before it calculates them. For example, a roll-up field for 200$+ would be given a count of 2 (2 fulfilled invoices connected to that customer). The calculated field could take that value, multiple it by 2 and then sum it with any other roll-up fields associated to the same count.
(how to use calculated fields: docs.microsoft.com/.../define-calculated-fields)
Each solution offered above depends on how you would want to meet this requirement. While I might not be able to give you the exact solution, you can use the above to consider each offered approach as a way to meet this requirement.