Hi @JeroenJanssens,
for analysis I would do the following:
1. Identify what triggers this error
ToDo's:
1. Check which workflows are registered for this custom entity for creation
2. Check which plugins are registered for this custom entity for creation
3. Check Plugin-Traces if somewhere the error shows up after triggering the creation
4. After you identified the plugin or workflow dig deeper and check for assignment of record. Maybe during debugging you will see the faulty code already...
First of all you need to know where the error is thrown in my oppinion.
You can then also forward this information here. On the current basis it is hard to find out what wents wrong.
Maybe you could also try to change the user's context after you identified the workflow/plugin.
Best regards,
Gerald Gut