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
jisaacjisaac 

has anyone built a custom auto-numbering formula with specific letters & numbers?

We want to start doing an auto-numbering of our opportunities but want to customize the convention.

 

We have different types of agreements - Contracts(CON, Subsequent product orders (SPO), Amendments (AMD) and would like to have the numbering be prefaced with the agreement type 3 letter code.

 

I figure the code can be a custom field that is determined by the Agreement type selected. But then I want to concatenate that three letter code with an auto-numbering.

 

I really do not care about the numbers, as long as the end result is unique -  not repeated.

 

So it could be CON00000000001, SPO00000000002, CON00000000003, AMD00000000004   and so on.....

 

Thanks for your ideas.

 

Jane

 

 

Best Answer chosen by Admin (Salesforce Developers) 
SurekaSureka

Hi,

 

Create an AutoNumber Field - eg. AutoNumber

 

If your picklists field name is "AgreementType", then create a Formula(Text) Field - Text(AgreementType__c)+AutoNumber__c .

 

This will give you the expected results.

 

Thanks

All Answers

SurekaSureka

Hi,

 

Create an AutoNumber Field - eg. AutoNumber

 

If your picklists field name is "AgreementType", then create a Formula(Text) Field - Text(AgreementType__c)+AutoNumber__c .

 

This will give you the expected results.

 

Thanks

This was selected as the best answer
rpr2rpr2

Does anyone have a way to have the auto-generated number increment separately for each different agreement type?

i.e.  CON00000000001, SPO00000000001, CON00000000001, AMD00000000001, CON00000000002, CON00000000003, CON00000000004, SPO00000000002

 

We're not the only one wanting this as there is an idea posted for this functionality:'

http://sites.force.com/ideaexchange/ideaView?c=09a30000000D9xt&id=08730000000BrGLAA0&returnUrl=%2Fapex%2FideaList%3Fc%3D09a30000000D9xt%26category%3DLarge%2BEnterprise%2BIdeas%26sort%3Dcomments

 

For now, we're looking for a workaround - or a solution if anyone has one!

Steve N FloridaSteve N Florida

"Solution" provides the prefix desired, but does not provide the sequential numbering CON..1, 2, 3;SPW..1, 2,3, etc.

 

We are looking for Prefix AND unique sequential numbering for that Prefix.  Because we have many business groups, we can have hundreds of Cases created each month.  We want to number EACH business group's Cases sequentially begining with 1 followed by 2 then 3 etc regardless how many other business groups create cases in between.  Support 1, 2, 3...;  Tech 1, 2, 3...;  Field 1, 2, 3,....101,102...; Ops 1, 2, 3, 4...