GlideRecord query on a specific table is not working for non-role (end user) user



The Glide record query to a table is not working under the below scenario,

  • When an end user ( user without no role) is forcefully redirected to Service Portal via property ""
  • When the snc_internal and snc_external roles exist on the instance, but "Explicit Roles" plugin was not active
  • Glide Record query is invoked from a Script Include

While the issue was occurring, we could observe below exception,

TypeError: Cannot convert null to an object. Param table: incident Param sys_id: xxxxxxxxxxxx Current user sys_id: xxxxxxxxxxxx : no thrown error


Any supported release. 


The GlideRecord query was failing due to the reason that snc_external and snc_internal roles appear to be manually added/imported to the instance although the "Explicit Roles" plugin was inactive. 


Take a back up and delete the manually added/imported snc_external & snc_internal roles. If you don't have access to remove them, please open a HI case to clean them up.

Ideally, activating the "Explicit Roles" plugin would automatically create snc_external & snc_internal roles. 

Additional Information

Explicit Roles

Activate the Explicit Roles plugin