• Maurizio Berti
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
Exercise:
"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 error: "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: REQUIRED_FIELD_MISSING, Required fields are missing: [Discount_Percent__c]: [Discount_Percent__c]"

I created 2 custom fields named radius and height, plus a custome field named Cylinder Volume into Opportunities Object. The formula I inseted into Cylinder Volume field is "ROUND(3.14159* radius__c * EXP(2) * height__c,0)". 
If I test it, inserting in the opportunity form the radius and height values, It works correctly but when I try to pass the challenge I receive the message above. I don't know why it refer to Discount_Percent__C fields.

Please Help me!!!
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.
 
Here is my formula: 3.14159 *  (radius__c ^2) *  height__c

Here is my error message:
User-added image

Any help would be appreciated!