Hello,
I am working on an API Before Save Script where I check the value of an attribute to determine whether the entity can be saved or not. The script works perfectly when the entity is updated, but I encounter the following error when trying to save a new entity:
"Can't use an entity w/o ID."
It seems like the script is trying to use the ID of the entity, which doesn't exist for new records. How can I modify the script to handle new entities (without IDs) and still enforce the logic based on the attribute value?
Thank you in advance for your help!
I am working on an API Before Save Script where I check the value of an attribute to determine whether the entity can be saved or not. The script works perfectly when the entity is updated, but I encounter the following error when trying to save a new entity:
"Can't use an entity w/o ID."
It seems like the script is trying to use the ID of the entity, which doesn't exist for new records. How can I modify the script to handle new entities (without IDs) and still enforce the logic based on the attribute value?
Thank you in advance for your help!
Comment