RE: Script is not functioning to avoid duplicate record creation when record is imported via CSV
Hi,
I have created script to throw error message if user tries to create duplicate custom record. Script trows error when user tries to create duplicate record. But when I am trying to import records through CSV import, duplicate record gets created.
Anyone knows reason? I will appreciate your help. Thanks!
Here is my script
You should add logging at the very beginning of the entry point to verify it is running. There are many settings that could impact this. UE scripts can have script contexts filtered out at the deployment level. Users and roles can also be filtered out for a UE script. However, one final thing to consider. If you have any SuiteCloud+ licenses, you could still have a race condition with your UE script if using multiple threads or queues for CSV imports. This approach cannot prevent against that, no matter how it is written. You should also remove the edit type from the script, or else it will prevent the editing of any existing records, since it does not filter itself out in the duplicate check.