Search code examples
dynamics-crmmicrosoft-dynamics

Sum Opportunity Line Quantity Dynamics CRM


I have a list of opportunity product lines associated to the opportunity. The products in the opportunity lines are labor based, engineering services. For projecting resource requirements I want to add two fields to my opportunity entity.

  1. Total Labor Effort

This field would be populated by the total quantity of all "labor based" products in the opportunity product lines.

  1. Weighted Labor Effort

Same as Total Labor Effort, except the value will be multiplied by the probability of closing the deal. This is a separate custom field in the opportunity.

I have tried a roll up field, but I can't seem to get it to sum up the quantity of the products in the product lines. It will only look at the product lines themselves. Calculated field seem to be more limited even.

What features of Dynamics CRM could help me achieve this?


Solution

  • Ultimately I solved this using MS Flow to retrieve all the Opportunity Line from an "updated" Opportunity and summing them up before finally writing to the Opportunity field. For weighted value I made a simple calculated field based on the close probability and total labor effort.

    MS FLow Screen Shot