I had created a custom record few months back whic...
# general
r
I had created a custom record few months back which was working fine but since the last few days have started getting ‘Record already exists’ message when I try to create a new entry. Even if I choose only the mandatory fields only (3 out of some 20 fields are mandatory) and choose a different value every time for the text fields, I still keep getting this. Anyone else faced the same issue? I do not see a mechanism to enforce unique constraint and have no idea which fields the custom record is pointing at. Thanks
k
Did this record get copied from sandbox?
a
Check for the autonumbering setup at this custom record, it might be generating the duplicate custom record name/number
r
Hi Kevin, it was copied over from sandbox
Hi Abrar, the autonumbering is off
k
If it was copied over from sandbox - look at your internal IDs - there's probably a strange numbering scheme going on
Probably some gaps, and it's trying to fill in a gap, but the record "exists" because it was created earlier. Normally this happens with things like terms. There's a suite answers article that addresses how to fix (it involves the use of the back button and resubmitting the record)- but the question is how many you created in sandbox, and how much overlap there could be to have to churn through before it catches up to the end of the list.
Couple of options if I'm right- churn through it manually until you get all the duplicates sorted out. or recreate the record - export your data, import to new custom record (making sure not to specify internal IDs - use them as external IDs). Then validate that everything copied over correct. Then update all your references to the new custom record (for linked custom fields and what not), and then you can delete the old one. Both are probably painful. of note - if you copied from sandbox, but didn't copy the data with the configuration- this wouldn't be the issue
In which case I'm probably looking for scripts/workflows running on the record, disabling them to see if I can create it without the scripts - and then re-enabling them until I figure out which script is causing the issue.
r
There was a custom workflow which was enabled and was throwing this error, found it now. Thanks so much for all the help 🙂