after/beforeInsert hook not available

I’m trying to build a beforeInsert hook on a data collection of permission type “Custom Use”, however, it seems as if this lifecycle hook is not available on this permissions type. I have all of the other lifecycle hooks available, just not this one.

Is there anyway to have this hook type available for these data collections?

Hi Jamie,

I have tried it and Before Insert hook is available on all permission types:

If you still don’t see it, pls send a link to your site so I can check why.

Thanks,
Asaf

https://www.restyleable.co.uk

Hi Jamie,

The issue you are having is not because of the permission type. It is because you can’t add any write-type hooks as it is an app collection (app collection is a collection that was automatically added when you added Stores or any other vertical to your site).

You might think of writing the code in the submit button of a new stores transaction event handler. I don’t know your use case so I cannot be sure this solution is right for you.

1 Like