Custom Table Query Not Returning Results on Customer Instance - Zurich Release
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
Hi Community,
We have an application published on the ServiceNow Store that is in use by our end customers. However, for one specific customer, we are facing a puzzling issue that we are unable to debug.
We have custom tables created in our application to store credentials. These custom tables extend from the Credentials table (discover_credential). We have Script Include functions that are responsible for fetching records from this table based on the TSG ID. Attaching a sample code for your reference:
try {
var snowConf = {
"username": "",
"password": ""
};
var gr = new GlideRecordSecure("[CUSTOM_TABLE_NAME]");
gr.addQuery("active", true);
gr.addQuery("sys_id", "5dfa85661b08cb9074762f4a234bcbfc");
gr.query();
if (gr.next()) {
snowConf.username += gr.servicenow_instance_username;
var snowPassword = gr.servicenow_instance_password;
snowConf.password = snowPassword.getDecryptedValue();
} else {
gs.warn("[Debug Script] - No active configuration found.");
}
gs.info("[Debug Script] Credentials retrieved successfully.");
} catch (ex) {
gs.error("[Debug Script] - Error: Unable to fetch credentials " + ex.toString());
}Environment Details:
Customer Instance Version: Zurich release
Debugging Steps We've Tried:
Executed the above script from a Fix Script to test if the script is working on the customer's vendor instance - but it is not working.
Executed the above script from a Scheduled Job that falls under our custom application scope - still not working.
Issue Summary:
The query returns zero results when executed on the customer's instance.
The same script works perfectly on other customer instances and our development instances.
Admin users are also unable to fetch records through this query.
Questions:
Has anyone ever experienced this issue, especially on the Zurich release?
What could be the possible root cause and resolution for such scenarios?
Are there any known platform issues or system properties in the Zurich release that could affect GlideRecordSecure queries on tables extending from discover_credential?
Any guidance or suggestions would be greatly appreciated.
Thank you in advance!