Portal Engine
Version 3.x > Portal Engine > How to create autonumber field in custom document? View modes: 
User avatar
Member
Member
danuta.welz-tatukgis - 11/4/2008 5:23:06 AM
   
How to create autonumber field in custom document?
I'd like to create in "new document type" field composed form two letter and a unique auto-numbered value (KB10234 - for eqample). How can I create auto-numbered (autoicrement) fields?

Regards,
Danuta

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 11/5/2008 8:36:59 AM
   
RE:How to create autonumber field in custom document?
Hi Danuta,

I am afraid but there is no feature for this in current version. You will need to develop custom form control (http://www.kentico.com/docs/devguide/developing_form_controls.htm). In the code of this control you will check the DB for the highest ID in appropriate table (e.g. document type table or CMS_Document table) and then you can increase the number and assign it to the new created document.


Best Regards,
Juraj Ondrus