Backendless Support
 
Answered

Can I Cancel Object Creation by throwing exception in beforeCreate event handler?

Is it possible or I have to use beforeSave event handler.

Leave a Comment

Comments (3)

photo
1

Hi Akshat,

Yes, you can cancel object creation by throwing an exception from beforeCreate event handler but only if it is a synchronous handler.

Regards, Ilya

photo
1

What if I use beforeSave event handler?

photo
1

As I know we don't have such Data Service event as 'Save'.

The whole list of events you can find here.

photo