Modifying number maintenance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2014 05:42 AM
1. What are the potential implications of changing the numbering system so that it display INCYYYYMMDD.0000 e.g. (INC20140925.0001)
2. Please advise how can this be technically achieved.
My thoughts are not to tamper with the OOTB functionality but to create a customer field. My concern is the maintenance of it. i.e.
- How would we handle user creating records are the same time.
- How do we reset the numbering and and how can we maintain this?
Please advise.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2014 03:29 AM
Thanks Harikrishnan,
Your solution is sound. Now how do I set up schedule to rest the number to zero?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2014 04:41 AM
Just write a schedule job, which runs daily at 00:00 and put in this code:-
var gr=new GlideRecord("sys_number");
gr.addQuery("prefix","INC"); //you can query sys_id here to be sure
gr.query();
if(gr.next()){
gr.number=0;
gr.update();
}
This should do it, just test it in demo before you implement it
Regards,
Hari
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2014 06:50 AM
Hi Abdul,
I think Harikrishnan have given you the perfect way to solve your issue.
Just to clarify, the above should be a Before Insert BR.
Thanks,
Subhajit