
Hi,
I'm starting to use the internal quote generator and I have my quote number formatted correctly for a certain case, but I would like to be able to choose a different formatted quote number based on the opportunity type. (I need to add one additional letter to the quote number if the opp falls in a certain category). Tips?
Thanks,
Matt S.
1 resposta
Hi Matt,
The standard QuoteNumber field in Salesforce is an auto-number field, which means its format is fixed across the entire object and can't dynamically change based on Opportunity criteria.
However, you can easily achieve this by creating a Custom Formula Field on the Quote object! Here's how:
1. Create a Custom Formula Field
- Go to Setup > Customize > Quotes > Fields and create a new Formula field (Text output type) named "Formatted Quote Number" (or similar).
- Use a formula like this to prepend your prefix/suffix based on the related Opportunity's Type:
IF(TEXT(Opportunity.Type) = "Special Category", "A-" & QuoteNumber, QuoteNumber)
(Replace "Special Category" with your specific Opportunity Type and "A-" with your required letter).
2. Update your Quote Template
- Go to your Quote Templates and replace the standard Quote Number field with your new custom formula field (Formatted Quote Number).
This keeps your underlying sequential auto-number intact while displaying the custom letter formatting whenever PDF quotes are generated!