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
laxman.g1.3964314255283564E12laxman.g1.3964314255283564E12 

Help me writing trigger for autonumber field which should start from 1 as day begines.

Hello friends, hope u will help me. I want to write a trigger for autonumber field which will start from 1, as day begines. Normally autonumber field is keep on incresing daily. But i dont want that, it should start from 1 as day begins. Help me writing trigger for this.
Karan Khanna 6Karan Khanna 6
Hi,

could you please explain your requirement in more detail?
Sonam_SFDCSonam_SFDC
In order to reset an autonumber  - you will have to change the field type to text and reset its value.
Reference: https://developer.salesforce.com/forums?id=906F000000096bpIAA

I would suggest you to keep the field type as text in case you wish to reset its value everyday and have the value incremented through a trigger so it behaves like an autonumber.

 







MagulanDuraipandianMagulanDuraipandian
http://www.infallibletechie.com/2014/05/how-to-start-renumbering-every-day-in.html

check this.

If this solves your problem, kindly mark it as the best answer.
Hit Like, if it saved your work :-)

Regards,
Magulan
http://www.infallibletechie.com