Bubble workflows using a cached record that applies to privacy rules?

Hi there. I have a datatype that locks out all access based on a field’s value in the user’s record. Temporary access to those records is granted by modifying that user’s field in workflows. By default, the privacy rules don’t allow access.

In my app, users are granted temporary access immediately after a page is loaded (the workflow looks something like “Modify user record (to grant access)” → “Do a search for (the record in that datatype)”. Technically, the search should succeed as the user is granted access in the first action (the privacy rules should permit access as the value is now what it should be) but I noticed that the “Do a search for” always fails because in that second action, Bubble is using some older/cached version of the user’s record (where they don’t have access). It only works in debug mode (step by step) where the app has time to catch up and see that the user should now have access according to the privacy rules. For the live app, I had to put in a pause for ~450 ms between the record modification and the search for it to work. Any shorter and the search fails. Does anybody have any insight or thoughts into this issue and/or how it could be fixed without adding a delay?

Thanks.

This topic was automatically closed after 70 days. New replies are no longer allowed.