Extended Company table - Duplicate Names disallowed?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2023 05:24 AM
I have a new requirement for a group to be able to maintain their own subset of Companies.
In my infinite wisdom, I figured extending the core Company table would be appropriate. What I've found is that it's not possible to have duplicate Named records that exist in the base and extended tables.
Is there a way around this (or is that a terrible idea)? I know there is some normalization that occurs in regard to this table, so that may be part of the issue.
I haven't seen this issue in other extended tables. I can't find a BR or Unique flag that is the reason you can't create a 'duplicate'.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2023 05:29 AM
Hi Shane,
I'm no expert in this area but a quick after a quick review I've found it's not recommended to extend the core Company table as it could cause issues with the normalization process, which is designed to ensure data consistency and integrity.
One alternative approach would be to create a new table to store the subset of companies that the group needs to maintain, and establish a relationship between this table and the core Company table using a reference field.
You can then create an ACL to restrict access to the new table, so that only members of the group are allowed to view and modify the records. To do this, you can create an ACL on the new table with a condition that checks if the user is a member of the group or has the required role, and restrict the access accordingly.
This approach will allow you to maintain data integrity while also providing the necessary access controls for the group to maintain their own subset of companies.
Hopefully this helps you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2023 05:45 AM
It does, I was just trying to avoid the rework. 😁
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2023 05:37 AM
You can write before insert business rule in which you can query the table and find if any previous company with same name exists. if the company name previously exits then you can append some text to the company name so that slightly different company subset name will be entered inside the extended table so that there will be no duplicate company names, it will be easier to find out which subset of companies you have in your extended table.
E.g. ServiceNow in base table
ServiceNow-1 in extended table