Blank Record Appearing in ESC Portal Search Results for Specific Users
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2025 05:02 AM
Hi Expert,
Question: On the ESC portal, when I search for the catalog item "Deploy DML" while impersonating specific user (e.g., Tony Stark), I’m getting a blank record in the results (refer below image).
issue/my findings: When I opened the blank record in a new tab, I noticed that fields like Number, Opened by, Assigned to, etc., were missing. However, when I ended impersonation and refreshed the same tab as an admin, I found that the record is actually an sc_task.
Upon investigation, I found that this is happening due to ACLs applied on the sc_task table — specifically, a user can only access an sc_task record if they are part of the Assignment Group or listed in the Watchlist.
In this case, the specific user (e.g., Tony Stark) is not part of the relevant Assignment Group or Watchlist, even though he has access to the sc_task table itself.
When I impersonated Tony Stark and opened the sc_task table in list view, no records were displayed — and no message (like "Security constraints prevent access") was shown, just an empty list view.
My approaches to solve: I tried the two approaches below, but neither of them worked.
Approach 1: In backend ESC Portal > Themes > bottom of the CSS field. I added below code but it did not work.
/* Hide result tiles that are completely empty */
.result-item:has(.record-title:empty) {
display: none !important;
}
Approach 2: Go to Service Portal > Search Sources:
Open the Catalog Task search source.
Make sure:
Active = true
Table is set to sc_task
Scripted Source = true
I've write below script in the Data Fetch Script field (not Facet Script)
(function(query) {
var results = [];
var gr = new GlideRecord('sc_task');
gr.addQuery('short_description', '!=', '');
gr.addQuery('number', '!=', '');
gr.addQuery('short_description', 'CONTAINS', query).addOrCondition('number', 'CONTAINS', query);
gr.query();
while (gr.next()) {
// ACL Check: ensure the user can read the record and fields
if (!gr.canRead()) continue;
if (!gr.short_description.canRead() || !gr.number.canRead()) continue;
results.push({
id: gr.getUniqueValue(),
table: 'sc_task',
name: gr.getValue('short_description'),
number: gr.getValue('number'),
});
}
return results;
})(query);
Does anyone know how to remove or hide the blank record from the ESC portal so that it doesn't appear in the search results?
Thank you in advance! Your answers and suggestions are highly appreciated.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2025 07:54 AM
Instead of finding a way to alter css to hide it, i would suggest you to try adjusting your ACLs which inturn should work hiding them automatically.
Regards,
Sumanth