Question
Has anyone gotten the following error when deploying roll-up summary fields and knows how to resolve?
- objects/My_Object__c.object (My_Object_c.Rollup_c) -- Error: The summarized field in not deterministic. (line 419, column 13)
Background
Doing some data model re-work and adding some new rollup summary fields. Strangely the field is fine in sandbox, but complains when I deploy to production.
Googling the error message produced no results, so no dice there.
The rollup referred to a formula field, which wasn't deterministic, but to be sure I changed the rollup to point to a non-formula field thinking I could change it post deployment, but alas I still get the error :(
Anyone seen this?
Updates
Appears that the error message is ill-placed. The offending field is another rollup on the parent of the custom object which is getting the field error. Still not clear why I could set the field up in sandbox, but deploying it to production fails ...
Attribution to: Ralph Callaway
Possible Suggestion/Solution #1
Maybe this article will help:
A formula is also considered non-deterministic when it includes:
Owner, autonumber, divisions, or audit fields (except for CreatedDate and CreatedByID fields)
References to fields that Force.com cannot index
Multi-select picklists Currency fields in a multicurrency organization
Long text area fields Binary fields (blob, file, or encrypted text)
Standard fields with special functionalities Opportunity: Amount, TotalOpportunityQuantity, ExpectedRevenue, IsClosed, IsWon
Case: ClosedDate, IsClosed Product: Product Family, IsActive, IsArchived
Solution: Status Lead: Status Activity: Subject, TaskStatus, TaskPriority
Attribution to: Eric
Possible Suggestion/Solution #2
While I'm unclear what the cause was I've been able to workaround the issues.
The main takeaway is that the error misreports the field, it should be on the grandparent.
My scenario
- Child__c
-> Parent__c
-> GrandParent__c
- Error on Parent__c.Rollup__c
- Cause due to rollup on Grandparent__c
for Parent__c.Rollup__c
The fix was to temporarily alter GrandParent__c.Rollup__c
to rollup a plain jane field on Parent__c
. After deploying you can then change GrandParent__c.Rollup__c
back to the original field.
Attribution to: Ralph Callaway
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/32122