Forum Academy Marketplace Showcase Pricing Features

How to use privacy rules to partition data

I need to partition data based on company name.
I.e. If a user belongs to company A then any records pertaining to company B, C or D should be hidden.
Seems like a simple enough thing to do but I can’t figure it out.
Any assistance will be appreciated.

Hi there, @mrunge… the limitation with privacy rules that is documented in these threads (and a bunch of others, too) makes what you have described a bit harder than it should be.

The way to go seems to be to store the company on the records associated with that company as well as storing the company on the user. With that structure in place, it is easy to construct a privacy rule that makes sure a user can only see records that belong to their company (i.e., something like Current User's Company is This Record's Company).

Hope this helps.


Hi @mikeloc
Many thanks for the method. It makes sense and I’ll try it now.
I’ll start with a user who signs up for a demo.
The demo company will have a bunch of records already created so they can navigate the system as an Administrator or an ordinary user.
I’ll let them make changes and create transactions and view reports, but as soon as they log out a backend workflow will restore the demo data.
Many thanks.

1 Like

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