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
Andrew GrayAndrew Gray 

volume of a cylinder

On this Challenge under Advanced Formulas : 

Your company sells cylindrical hyperbaric chambers. You need a formula field that calculates the volume of a cylinder for you, rounded to the nearest whole number, given its radius and height. Use the existing mathematical formula for the volume of a cylinder, V = πr2h, where r is the radius of the cylinder, h is the height, and π is the constant Pi. Note: Although this formula field might best be created on a custom object, for simplicity, we’ll create this formula on the Opportunity object.

I get an error  about Discount_Percent__c being a missing field. This feild doesnt appear to have anything to do with the challenge ?? Confused.

Thanks 

Andrew
Best Answer chosen by Andrew Gray
Amit Chaudhary 8Amit Chaudhary 8
Please check below post For solution
1) https://developer.salesforce.com/forums/?id=906F0000000MIqmIAG

Make sure you are returning 0 for the decimal places.
3.14159 *  (radius__c ^2) *  height__c
or
3.14159 *  radius__c * radius__c *  height__c

It looks like you have a required field already on the Opportunity object that is preventing the test from running successfully. Any way you could remove or make that field not required? Or possibly use a brand new developer org as a last resort.

https://developer.salesforce.com/forums/?id=906F0000000MIy7IAG

Let us know if this will help you


 

All Answers

Amit Chaudhary 8Amit Chaudhary 8
Please check below post For solution
1) https://developer.salesforce.com/forums/?id=906F0000000MIqmIAG

Make sure you are returning 0 for the decimal places.
3.14159 *  (radius__c ^2) *  height__c
or
3.14159 *  radius__c * radius__c *  height__c

It looks like you have a required field already on the Opportunity object that is preventing the test from running successfully. Any way you could remove or make that field not required? Or possibly use a brand new developer org as a last resort.

https://developer.salesforce.com/forums/?id=906F0000000MIy7IAG

Let us know if this will help you


 
This was selected as the best answer
Tom Wild 4Tom Wild 4
Hi, I am struggling with this challenge, I keep getting - 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: NUMBER_OUTSIDE_VALID_RANGE, radius: value outside of valid range on numeric field: 10.00: [radius__c]

Can you help?

Thank you!

Tom