function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Subramaniam VaikuntamSubramaniam Vaikuntam 

Trailhead for formulas - Roll-up Summary

I am just carrying out these simple steps. Upon checking it I get this error

Add a custom field to the standard account object that provides a rollup summary of the total expected revenue from all related opportunities.The rollup summary field should be labeled 'Potential Value' and have the Field Name of 'Potential_Value'. The resulting API name should be 'Potential_Value__c'.
The rollup summary should calculate the total expected revenue of all the opportunities related to the account.


ERROR I GET
Challenge not yet complete... here's what's wrong: 
There was an unexpected error in your org which is preventing this assessment check from completing: System.DmlException: Insert failed. First exception on row 0; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, You cannot close the opp without a reason: []
James LoghryJames Loghry
Looks like you perhaps have a trigger to automatically close Opportunities, and/or a custom validation rule on the Opportunity that prevents it from being closed.  Try disabling those first, and then rechecking your challenge.  If that doesn't work, then try creating a new and clean developer org and redoing / rechecking the challenge.
Subramaniam VaikuntamSubramaniam Vaikuntam
Thanks James, that helped! There was a validation rule on Opportunity for not allowing to close without a reason. I removed that trigger and was able to complete the challenge. However before I posted the question I checked all opportunities that were closed with a 'Close Reason'. Would you be able to tell me why wasn't that enough?