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
Jack LauraJack Laura 

Default Value Formula based off of Amount in an Opportunity

Hey, 

I'm trying to create a formula for the default value based on the amount of an opportunity.

Ive created a Custom Field called 'Mark-Up' on the opportunity page which needs a default value formula of:
'Amount (of the Opportunity)' / 110 * 10

Im using the standard 'Amount' field to achieve this

However this doesnt work at all, 

Any ideas?
Hemant_SoniHemant_Soni
Hi Jack Laura,

Can You please tell us what result you are expected because i have tested this formula and it work fine.
For Example : 
Amount : 1500$
So Calculation Of Formula Is :
1500/110 == 13.36 And Then 13.36*10 == 136.36 and this was perfect.
If you are expecting anything else then please describe with example.

Thanks
Hemant
Jack LauraJack Laura
Because I need to reference the Amount Field, the default value formula comes back with an error "Error: Field Amount may not be used in this type of formula", however your formula provides the answer I need, just cant define it against the Amount field 
Hemant_SoniHemant_Soni
what i thought ,may be you are using wrong data type of formula field. I was using number type of formula field and it will not giving any error so please try with number type of field.

if this help then mark it solved.
Jainam ContractorJainam Contractor
Hi Jack,

The new custom formula field you created should be of type Currency as you are using a Currency field (Amount) as a reference.

Once you create a Formula field, use the below formula to define the Custom Field. i.e.

(Amount * 10)/ 110

Check for syntax error and save (if not errors)

Please try this and let me know if it works for you.

Thanks,
Jainam Contractor,
Salesforce Consultant,
Varasi LLC
www.varasi.com