Mullti-tenancy - access denied with master-detail screen

Hi All,
when using master-detail screens, I get an access denied error


and when I press second time OK, the record is written to the database, without filling the tenant_id column.

To reproduce the bug, I used your example project from GITHUB and added the screen “store-browse2” (41 Bytes) (336 Bytes) store-browse2.xml (3.5 KB)

Hier the log:
app-part.txt (23.6 KB)

Would be great to get some help on this as I really would need to get multi-tenancy up and running

Hi uwe,

Can you share a complete sample project? Normally this helps the people to much faster work on the investigation and with that increases your chances of getting help fast :slight_smile:


Hi Mario,

please find the project folder here:

Cheers, Uwe


I think the problem you are facing is due to the bug in the 2.0.0.BETA1 of the addon.

The problem is described here: Multitenancy not working? - #4 от пользователя h.hamstra - CUBA.Platform
The issue is described here: TenantId is not set for new entities · Issue #39 · cuba-platform/multitenancy-addon · GitHub

Attached I changed the project and added the mentioned MultitenacyEntityPersistingListener class in the core module. Now everything seems to work:

05 (299.2 KB)

In the 2.0 release, this problem should already be resolved.


Hi Mario,
many thanks for your great support. Intgerated in my application and works!
BR, Uwe

1 Like