user-department and user-company relationship

amitservicenow
Kilo Contributor

Hi,

By default snow has one to one relationship between user-department and user-company. The user table has one 'department' field of reference type that stores the relationship. If we want the user top be part of two or more departments or two or more companies then what would be the best solution as the requirement is that the user can be part of more than one department and companies and should be able to view the records for that department or company only.

1 REPLY 1

mike_bush
Kilo Guru

I presume you are trying do represent users "deployed" or "working for" several departments / companies? I think your best bet is to create a small new "m2m" table as is normal for many-to-many relationships - the records just have two REF fields, one points to USER the other to COMPANY (for example). See the "Users Covered" table which links users to contracts.