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
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” :
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.
@MarijeSchillern Hi, do we have any OOTB Pega Rest API exposed for this unique ID generator ? I want to use this for Payment Reference ID ,if possible.