SBusinessDataNotFoundException: persistenceId of business data is null

I have a problem with a new object I created in the BDM.
I created an object "Autorisation" and added 2 variables of this type in an existing object "MainModel".
In a form, I return a json array of Autorisation and in the task operation, I have a script to set the variable of the MainModel :