RE: Extensible Data Security for specific company
Hi csaez,
In this reply, I do assume the smmBusRelTable is having data per legal entity and it is not shared via a virtual company.
It would be possible to create a MyConstruct table having data per legal entity with the user IDs which are allowed to be visible.
The query should then have the smmBusRelTable as main datasource and the new MyContstruct table linked on the UserID and the MTHComercial field.
In the example provided above, you can learn how to create an xds() method which loops through the different legal entities (source code is downloadable for free). Then insert in all legal entities all users to this table and in the specific LE only the current user. The MyConstruct is a temporary table which will be initialized on the first access and has a specific instance per user.
The result would be a table with is having as example the next records for User1 (assuming you have the legal entities 'kad', 'co1' and 'co2':
kad - User1
co1 - User1
co1 - User2
co1 - User3
co1 - User4
co1 - User5
co1 - User6
co2 - User1
co2 - User2
co2 - User3
co2 - User4
co2 - User5
co2 - User6
Please let me know if this helps you.