- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2024 02:41 PM
Guide to Implementation: Creating a Custom m2m Table and Overcoming Its Challenges
Introduction:
This document outlines the process and challenges encountered during the implementation of a new request from the Server Team. The team wanted to link Service (SVC) accounts to their respective servers for a password project. The functionality was to be made available on the Server Class, with editing and adding SVC accounts to servers restricted to respective server support group members.
Implementation Process:
The following steps were outlined to achieve the desired functionality:
- Creation of Many-to-Many (m2m) Table: A m2m table will be created between Sys_User and CMDB_CI_Server tables. These tables will be added to the form under the related list for Windows, Linux, Unix, and ESX servers as “Linked Service Account” and as “Associated Server CI’s” for the sys_user table.
- Access Control List (ACL) Modification: The ACL will be created/modified accordingly to restrict access to the respective server support group members.
Challenges and Solutions:
Post-implementation, we encountered the following challenges:
- Invisible Columns: The columns under the “Linked Service Account” related list were not visible.
- Edit Button Accessibility: Non-admin users were unable to see the edit button under the related list, even after satisfying the write ACL and ensuring the “Omit Edit Button” under list control was unchecked.
To overcome these challenges, the following steps were taken:
- It turned out that the ACL’s would not be created for custom m2m tables as it doesn’t give an option to create the ACL’s and I had to create 4(create/read/delete/update or write) ACLs as per the business requirements.
Write ACL Script for restricting the permission only to Support Group Members:
- The columns under the related list were added manually using the List Layout.
- The Edit button was visible to admin users due to the out-of-the-box (OOB) UI action. I had to create a new UI Action to override this functionality, which enabled the Edit button as expected.
OOB UI Action: By default, admin users will have permission to create to any tables.
Conclusion:
This document serves as a guide for beginners to intermediates facing similar challenges. The process might seem straightforward initially, but it’s important to anticipate potential issues and know how to navigate them.
Solved! Go to Solution.
- 1,127 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2024 03:03 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2024 03:03 PM
Thanks for sharing, appreciate the real world use case provided
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2024 05:56 AM
Thank you for your kind words!!! I'm glad you liked it and will be posting more real time use cases.