Search code examples
dynamics-crmrollup

Need help creating rollup field for aggregating child records' Gross Profit values on Parent record


I am trying to create a rollup field on a Parent Opportunity record that will show the sum of all Estimated Gross Profit values of the child Opportunities associated with that parent record. One parent Opportunity record can be associated with many child Opportunity records.

However, I am running into some issues:

  1. The Parent Opportunity includes "Est. Gross Profit" as well, and if the user fills out this field on the parent record, it is showing up in my "Parent Est. Gross Profit" rollup field. I only want child Opportunity records to be included in the sum for "Parent Est. Gross Profit".
  2. I've noticed the rollup field takes a very long time to update... even hours maybe. Is there a way to avoid this?

Am I going about this issue the right way? Is there a better way to create a sum of the child Opportunities' Est. Gross Profit values on the parent record?

Thanks!


Solution

    1. Make sure you are using the right relationship in your Rollup query definition - new_opportunity_childopportunities

    enter image description here

    1. Rollup calculation job is an asynchronous job with default schedule. Read more

    You can modify the recurrence of the system job minimum 1-hour schedule. Read more

    enter image description here

    Rollup calculations
    The rollups are calculated by scheduled system jobs that run asynchronously in the background. You have to be an administrator to view and manage the rollup jobs. To view the rollup jobs go to Settings > System Jobs > View > Recurring System Jobs. To quickly find a relevant job, you can filter by the System Job type: Mass Calculate Rollup Field or Calculate Rollup Field.

    Mass Calculate Rollup Field is a recurring job, created per a rollup field. It runs once, after you created or updated a rollup field. The job recalculates the specified rollup field value in all existing records that contain this field. By default, the job will run 12 hours after you created or updated a field. After the job completes, it is automatically scheduled to run in the distant future, approximately, in 10 years. If the field is modified, the job resets to run again in 12 hours after the update. The 12 hour delay is needed to assure that the Mass Calculate Rollup Field runs during the non-operational hours of the organization. It is recommended that an administrator adjusts the start time of a Mass Calculate Rollup Field job after the rollup field is created or modified, in such a way that it runs during non-operational hours. For example, midnight would be a good time to run the job to assure efficient processing of the rollup fields.

    Calculate Rollup Field is a recurring job that does incremental calculations of all rollup fields in the existing records for a specified entity. There is only one Calculate Rollup Field job per entity. The incremental calculations mean that the Calculate Rollup Field job processes the records that were created, updated or deleted after the last Mass Calculate Rollup Field job finished execution. The default maximum recurrence setting is one hour. The job is automatically created when the first rollup field on an entity is created and deleted when the last rollup field is deleted.

    Online recalculation option. If you hover over the rollup field on the form, you can see the time of the last rollup and you can refresh the rollup value by choosing the Refresh icon next to the field