Cloud Code - BeforeRead Trigger?

Hi. Is there any beforeRead trigger like before save trigger? I wanna make some actions before some user read other users data.

For example if user has private profile, and other user doesnt follow her I wanna reject request and throw an error. How can I do this?

Maybe you need BeforeFind?

1 Like

Thats what Im looking for. And It was in front of my eyes from the begining. Wonder how I couldnt see this

One more question. Do BeforeFind Trigger works for every object? or every query?

For example I wanna get 30 objects with one query operation. Does BeforeFind works for 30 time or one time?

The beforeFind is triggered once per query (and not per retrieved object).

1 Like