Question
Tata Consultancy Services
IN
Last activity: 28 Nov 2022 4:31 EST
Generate sequential Unique ID for property without any prefix
Hi All,
I have a requirement to generate unique ID for one of the property in Case which should be increased by one on creating every new case. Please help me with the steps to generate unique Id for a property which should be sequential for every case creation.
For ex: On first case, it should be 100 and on next case it should be 101
Thanks,
Nirmala J
***Edited by Moderator Marije to add Capability tags***
@NirmalaJ2240 Please see support article Case IDs increase daily by 1000 (SA-103704)
Also review SA-60811 :
You can manually reset PYLASTRESERVEDID values in the PC_DATA_UNIQUEID table for a number of impacted object IDs to the correct values for the corresponding objects.
You can also consider using the Market Place "Unique ID Generator for Pega Cases" :
https://community.pega.com/marketplace/components/unique-id-generator-pega-cases
The use of 'idGenerator/defaultBatchSize ' is documented here:
https://collaborate.pega.com/discussion/case-id-generation-mechanism
https://community.pega.com/knowledgebase/articles/whats-new-pega-platform/increase-performance-work-id-generation-83
You can disable it with the DSS setting or just keep it, which is what we recommend since it increases performance.
@NirmalaJ2240 Please see support article Case IDs increase daily by 1000 (SA-103704)
Also review SA-60811 :
You can manually reset PYLASTRESERVEDID values in the PC_DATA_UNIQUEID table for a number of impacted object IDs to the correct values for the corresponding objects.
You can also consider using the Market Place "Unique ID Generator for Pega Cases" :
https://community.pega.com/marketplace/components/unique-id-generator-pega-cases
The use of 'idGenerator/defaultBatchSize ' is documented here:
https://collaborate.pega.com/discussion/case-id-generation-mechanism
https://community.pega.com/knowledgebase/articles/whats-new-pega-platform/increase-performance-work-id-generation-83
You can disable it with the DSS setting or just keep it, which is what we recommend since it increases performance.
If you set the batchsize to be 1, then you'd get performance comparable to the legacy ID generation. We suggest clients to make a decision based on their usage, do you want performance for ID generation? Are you creating thousands of cases an hour? Then stick with higher value of batch size. If performance is not important to you then set batchsize to a small number.
The best practice here is to ignore IDs or the sequence in which IDs are generated. Clients should not rely on a smaller ID to indicate a case that was created prior to a case with higher ID. If client takes this advice, then there's no need to set batchsize to 1; keep it at the default value of 1000
If you want the batch size to differ with case type, you could create another Dynamic System Settings (ex. idGenerator/P-/batchSize).
In a multi application environment, caseId generation depends upon database rather than application. For example, if we have two application namely App1 and App2 with case types as CTApp1 and CTApp2 respectively with same case prefix as 'P', the case ID's being generated at App1 will be P-1001, P-1002 and in App2 will be P-1003 , P-1004 and so on, which explain that caseID generation depends on database rather than application.
Please see this documentation:
https://collaborate.pega.com/question/unique-id-generation
https://community.pega.com/support/support-articles/sequence-case-ids-generated-incorrect
https://collaborate.pega.com/discussion/case-id-generation-mechanism
https://collaborate.pega.com/question/work-unique-id-pylastreservedid-getting-increased-abruptly-post-upgrade-pega-83
https://community.pega.com/support/support-articles/case-id-sequence-incorrect-when-case-created-pega-83