Error tenant required in calculation on tenant resource
Hello!
I'm getting an error I don't really know how to solve. It might be a dumb error from my side.
I'm trying to count the number of rows of a resource inside a tenant (the 'items' table) and have it as a calculation on my tenant (the 'project' resource). This way I can know from the outside of the multi-tenancy world how many items are inside a project.
I've added this simple action on the Item resource:
I created a module calculation with this single function (I'm using a code interface for that action):
No matter what I get a Invalid.TenantRequired when I call count items. The project does implement the ToTenant and I also tried passing the tenant string directly (proj_ <> id).
Should I do this stuff in an entirely different way perhaps?
I'm getting an error I don't really know how to solve. It might be a dumb error from my side.
I'm trying to count the number of rows of a resource inside a tenant (the 'items' table) and have it as a calculation on my tenant (the 'project' resource). This way I can know from the outside of the multi-tenancy world how many items are inside a project.
I've added this simple action on the Item resource:
I created a module calculation with this single function (I'm using a code interface for that action):
No matter what I get a Invalid.TenantRequired when I call count items. The project does implement the ToTenant and I also tried passing the tenant string directly (proj_ <> id).
Should I do this stuff in an entirely different way perhaps?
