You need to sign in to do that
Don't have an account?
Jayne Monat
Trailhead: Number formula that calculates the volume of a cylinder
I am working on the Trailhead challenge asking me to create a formula field calculating the volume of a cylinder. I am 99% sure my formula is correct but the error message I am getting is asking me to include a "required field" that is not mentioned in the challenge. Here is the prompt:
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.Create 2 custom fields of type Number on the Opportunity object: ‘radius’ with a resulting API name of ‘radius__c’ and ‘height’ with a resulting API name of ‘height__c’.
The formula should be named ‘Cylinder Volume’, with the resulting API name ‘Cylinder_Volume__c‘ and should be created on the Opportunity object.
The formula should reference the custom fields ‘radius__c‘ and ‘height__c‘.
The formula should use 3.14159 as an approximation of Pi.
The formula should be named ‘Cylinder Volume’, with the resulting API name ‘Cylinder_Volume__c‘ and should be created on the Opportunity object.
The formula should reference the custom fields ‘radius__c‘ and ‘height__c‘.
The formula should use 3.14159 as an approximation of Pi.
Here is my formula: 3.14159 * (radius__c ^2) * height__c
Here is my error message:
Any help would be appreciated!
Here is my error message:
Any help would be appreciated!
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.
Thanks
Jeff Douglas
Trailhead Developer Advocate
All Answers
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.
Thanks
Jeff Douglas
Trailhead Developer Advocate
round(3.14159 * (radius__c ^2) * height__c,0)
;-)
Olivier Wiener,
round(3.14159 * (radius__c ^2) * height__c,0) its wrong, please correct it, I tried its not working syntax error.
I deleted the Discount Percent (Discount_Percent__c) field and it's related Approval process. Used the Formula ----> Cylinder_Volume = Round(3.14159 * height__c * (radius__c^2),0) And it worked fine. Cheers