Restricting Child Table Records from Application Reference Lookups
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
7 hours ago - last edited 6 hours ago
Hello team,
We have a requirement to use a CMDB-based table in ServiceNow because an existing integration with a third-party application is configured to retrieve data only from CMDB tables. Therefore, instead of creating a new standalone custom table, we need to use a table that extends an existing CMDB table.
To meet this requirement, we are using a child table that extends cmdb_ai_appl and are currently reusing the inherited CI Name field for our custom requirement.
However, because of ServiceNow table inheritance, records created in the child table are also returned when the parent Application table is queried. This behavior is not limited to the Application table list. Wherever the Application table is referenced, the child-table records may also appear in the reference lookup.
If a child-table record has the same CI Name as an existing Application record, users may see multiple records with the same name. This creates confusion because users may not be able to distinguish between:
- The actual Application record maintained in the parent Application table.
- The child-table record created specifically to support our custom requirement and third-party integration.
Additionally, end users do not have visibility into the Class (sys_class_name) field to differentiate these records. Therefore, when the Application table is referenced from other forms, the actual Application record and the child-table record may appear identical to the user, creating a risk of selecting the incorrect record.
We have configured the required ACLs on the child table, and the child-table records need to remain globally readable to support the integration and business requirement. Therefore, completely restricting read access to the child table is not a suitable solution.
Guidance Required
We are looking for the recommended ServiceNow design approach for this scenario:
Is there a supported way to exclude the child-table records from being returned through the parent Application table and its reference lookups, while still keeping the child table globally readable?
If restricting child records from parent-table queries is not recommended due to CMDB table inheritance, should we consider using dedicated fields on the child table instead of reusing the inherited CI Name field?
Our objective is to continue using a CMDB-extended table to support the existing third-party integration, maintain the required global read access to the child table, and at the same time prevent custom child-table records from appearing as duplicate or misleading Application records to end users.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago - last edited 3 hours ago
You could use a query business rule.
- Table: cmdb_ai_appl (and you might have to do one for cmdb_ci, too)
- When: before
- Query: checked
- Condition: you will need to exclude users with the admin role and whoever else should be able to see these records, if you ever want them returned.
- Script: Add something like this:
current.addQuery('sys_class_name', '!=', 'yourclassname');
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
@JenniferRah Thanks for the reply!
As per servicenow best practices Query Business Rule is not recommended and also my organization is allows only Servicenow best practices.
Could you please let me know the alternative solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
@Mad3 ,
In the Lookup, Add Condition class (sys_class_name )is Application. Basically you can add a condition class(Sys_class_name) is Parent Table. This will only show the record of the parent table that you have entered and will neglect any other .
Please Mark the Reply as Correct Answer if it Resolves your Query
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago - last edited 3 hours ago
Hi @Mehta , Thanks for the reply!
We see other child table records in Parent table (Applications - Cmdb_ci_appl), we want to restrict specific table (only one) only.