+ Start a Discussion

How can I dynamically give ID to each record in Lead, Opportunity, Account, etc in salesforce.

I want my each record to have a unique ID 
i.e In format:- ABC001
Can I assign each object of Account, Lead, Opportunity a unique id ?
Devi ChandrikaDevi Chandrika (Salesforce Developers) 
Hi Nyshaa,
You can use auto number field  for this requirement. Create an auto Number field on each object to get unique number for each record.
Auto Number : Automatically assigns a unique number to each record. The maximum length of any auto-number field is 30 characters, 20 of which are reserved for prefix or suffix text. Not available for external objects.

Please refer below link which might help you in this

Hope this helps you
If this helps kindly mark it as solved so that it may help others in future.

Thanks and Regards