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
Govardhan Reddy GuduruGovardhan Reddy Guduru 

Autonumber for a field based on record type record creation on case object.

Tried wit Formual but No luck, trying to implement a trigger.
Raj VakatiRaj Vakati
That is the only way ... If you want generally auto number it count for all record types 

Autonumber for a field based on record type is only way is you can able to do it based on the apex trigger ( before insert )

like below 
trigger AutonumberRecTypeCustomer on Account (before insert, before update) {

    list<Account> Acc= [SELECT Id,Name,Customer_Number__c FROM Account WHERE Customer_Number__c !=:null order by Customer_Number__c desc limit 1];
    decimal maxlead = Acc[0].Customer_Number__c;    

    for(Account Acci:Trigger.new){
        if(Acci.RecordTypeId =='012a3456789BCde'){
            Acci.Customer_Number__c = Integer.valueOf(maxlead)+1;
            maxlead++;
        }
    }  
}