New field with auto-increment
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2015 01:09 PM
Hi everyone,
I created a field "Reference event" that I want to act similar to how Incident works with auto-increment with the prefix INC. I made a new prefix in Number Maintenance and added a business rule with a condition "current.event_reference.nil() and a script:
function onBefore(current, previous) {
current.event_reference = getNextObjNumberPadded();
gs.addInfoMessage("Created Incident " + current.event_reference );
}
The column in my table has the default value Next Obj Number Padded. When I go to my form, it is not showing a value at all. Anything else I should consider? Any help would be great, thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2015 11:26 PM
Do it like this in the default value. Dont use it as dynamic
javascript: global.getNextObjNumberPadded() ;