user-department and user-company relationship
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-27-2016 10:48 PM
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.
- 2,599 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-28-2016 01:28 AM
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.