New Document type ID generation

I created a new document type facture with a field numFacture, When I save it into database the ID column is automatically generated it has such value “bbe7a3d3-274a-4c18-ab93-ef582a965ec1”. What I want is to make the numFacture field the primary key and get rid of the generated ID.

0 votes

1 answers

10797 views

ANSWER



The Nuxeo technical ID is necessary for the good behaviour of the platform and cannot be removed. Yet you can use any field of your document including custom ones for fetching the document you want (thus storing the numFacture as a custom property). If you want also to access the invoice via its numFacture value in the URL, you can implement a new URL codec.

You can also implement some custom ID generators.

0 votes