Hi,
I'm unable to create multiple records in a custom record due to a "Duplicate key violation" error on the "Phase Id" field, which appears to be enforcing uniqueness unexpectedly.
The exact error that's displayed is "Duplicate key violation: field name 'Phase Id'".
This is how I set up the custom record:
1. Created the custom record and set the unique identifier to a new SMALL_TEXT field I called "CatalogNumber_c".
2. Created the rest of the fields, added them to the forms, and created the workflow with 2 metaphases: "Active" and "Inactive". I also created "Active" as the starting phase.
3. After creating the workflow, I usually add an "Inactive" normal phase, connect it to the "Active" phase, and move it to the "Inactive" Metaphase.
This time, however, I forgot to do so and only had 1 "Active" normal phase and nothing in the "Inactive" metaphase.
4. Created 2 Business rules, one is a filter in "Rendering Forms", and the other is a "Set field" rule meant to concatenate different values from fields to create a DisplayLabel. None of these rules referenced "Phase Id".
4. Activated the Custom Record using the Studio Menu.
5. Created 1 record by hand and made sure that it was created successfully.
6. Using a CSV file to import more records - The import failed, and this is when I discovered the problem in the errors JSON file.
In order to troubleshoot this, I've tried:
- Deactivating/Activating the custom record
- Deleting and re-adding the phases
- Creating the records with the GUI and REST API
- Exporting and importing the package of that specific custom record
None of the above steps fixed it, so any help is appreciated.
Thank you