2

I have a declarative COUNT roll-up summary field that is returning Negative values after upsert operations.

The roll-up summary COUNTS all fields where Checkbox = TRUE

The roll-up summary's child object is a junction object where both Parents are Master-Detail (Parent:Team - Detail: Team Member - Parent: Employee)

One the Parents is an object that stores data from an external data source (Employees) that is updated with the standard salesforce.com import custom object wizard on a regular periodic basis

This Parent (Employee) also has a trigger that passes the last modification date to the children and to the other related Parent (Team). e.g. I updated an Employee, that Employee is a part of a Team, ergo the Team was updated

When employees are upserted the Roll-up summaries are returning negative values in many cases

I am trying to decifer is this issue is a bug related to declarative roll-up summaries or it an issue with execution context of the trigger. It seems to be a bug given the summaries return Negative values. Logically, a COUNT should never return negative.

Salesforce Partner Support reviewed and confirmed the occurance but would not classify it as a "bug" stating:

"...Unfortunately the calculation of rollup summary fields is not always straight forward. Our R&D Team always works to correct any issues that might appear and to improve the functionality. To aid customers that are impacted by invalid summary fields, we have the option to do a mass recalculation..."

Understanding there is a workaround to force recalculation - I am having a hard time confirming that miscalculation only occurs on import and does not occur in any other case. Because of this, it makes it hard to use the value as accurate reporting metric.

Has anyone come across this issue, seen similar behavior, or has access to any documentation that documents Roll-up summary limitations / considerations?

Thanks in advance!

  • 1
    i have to say you are not the only one. I work for a financial institution and yesterday we noticed the same problem. Been scratching my head why this happens... – canyoucatchme Jul 16 '14 at 22:27
  • If you've tried a force recalc, have you still seen this behavior afterwards? Have you ever seen this on a strict count RSF, with no filtering on checkbox? – Carolyn Grabill Jul 19 '14 at 22:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.