I have Autonumber (fiscal year). For example Jan 1 2018. My AutoNumber field will be 180000 . For next Year Jan 1 2019. my autonunber should be 190000.. is this possible ? Thanks for the help
There is no standard way to do this. Not by Apex as well. However, You can do this for your custom autonumber fields.
- Click on Your Name | Setup | Build | Customize | Object Name | Fields
- Click Edit next to the Auto-Number field you want to modify
- Click "Change Field Type" and select the Data Type as 'Text' and click 'Next'.
Note: This does not work for Standard Auto-Number fields like Case Number, Solution Number etc. For Standard Auto Number fields, the steps are given at the bottom.
- Click 'Save' on the next Screen (Step 2) unless you want to modify the Field Level Security for profiles, which is there on the next screen (Step 3). Now the data stored on Auto Number field is converted into Text values.
- Repeat Step 1 to 3. However, in step 3 change the Data Type back to Auto Number.
Note: This step would allow you to set the starting auto-number.
- Now you will receive a pop-up with the following message: "The new Display Format will only be applied to new records. Existing records will remain unchanged."
- Click OK.