I need to create projects from instances of our custom object and I need them to be autonumbered.
Here on Community I found this thread: https://communities.ca.com/message/14395252#14395252
And I tried solutions written in there:
Unfortunately the Autonumber tag does not work for the Project. Why? i do not know.
What i have done in the past is to get the next value from the cmn_autonumbering_schemes table. The issue is that this only gets you the last one, and does not update it for you.
There is a stored procedure that you can run to get this value as well.
this is the query that gets you the next id change the object code to project, and partition code to whatever it might be
AND object_code = 'project'
AND attribute_code = 'code'
AND partition_code = 'NIKU.ROOT'
This is the SP that populates the next value for you in that table (change the partition code if needed)
if you are on Oracle, you could write a function that returns the out value from the SP (this is the safest way to do it).
Hope this helps.
This query returnes the value of ProjectID but it's still the same.
I also tried to call the procedure, but I was not successful
Please do you have any idea how to solve it?