+ Start a Discussion
krish@123krish@123 

Please suggest me how to change the autonumber based on year in a custom object ......very urgent


Hi 
Please suggest  me how to change the autonumber based on year in a custom object 

for example : i have created records in December 2014

my last record sequence is AP-0090
it's ended .

Then from January 2015
the record sequence start with again AP-0001

So please send  me a code if  possible  

Thanks








 
Ashish_Sharma_DEVSFDCAshish_Sharma_DEVSFDC
Hi,

This can be accomplished with the following steps:

1: Click on:

Setup | App Setup | Customize | Object name | Fields | Edit Field Name | Click the Change Type of this Field button.

2: Change the field type to Text, click Next, click Save.

3: Repeat the steps noted above and change the field type back to Auto Number , this allows you to set the starting auto-number.

You will receive a caution warning that if the next number you enter is not higher than existing numbers, it may be possible to create records with duplicate numbers when changing the auto-number format multiple times using similar formats.

Note: This does not work for objects installed by managed released packages, as components below are locked: - "data type" on custom field - "record name data type" on custom object - "record name display format" on custom object

If you want to restart auto number fields on objects from a managed released package, you can uninstall the package and reinstall it.
krish@123krish@123
Hi Ashish,

          But users will feel dificult for manual work .Please suggest me other way like by year change's dynamically  autonumber will also change

Thanks