Reference field in Catalog Item works fine for admin but not for user?Why?

VIKASM535239375
Kilo Sage

Reference field in Catalog Item works fine for admin but not for user? Why?

It calls Custom Table.

 

Also based on that Reference field another field should be autopopulated.

 

Hence if I use Lookup select box instead of Reference field in Catalog Item  then we cannot autopopulate the dependent field. Please provide the solution.

2 REPLIES 2

Matthew_13
Mega Sage

Hi Buddy

 

Admin users can see everything, but non-admin users can only see what security rules allow. In this case, the reference variable points to a custom table, and normal users do not have read access to that table or to one or more required fields. As a result, the reference lookup works for admin but returns limited or no results for users. When the reference value cannot be read, any dependent auto-population logic also fails.

The fix is not to switch to a Lookup Select Box. The fix is to correct access.

First, ensure users have read access to the custom table being referenced. They must also have read access to the display field used by the reference variable and to any fields you are trying to copy into dependent variables. Admin bypasses ACLs; users do not.

Second, review any reference qualifier on the variable. If it filters on fields the user cannot read, the reference list will be empty for users even though it works for admin.

For auto-populating the dependent field, keep the Reference variable and use an onChange catalog client script. When the user selects a value, use getReference() to retrieve the related field and set the dependent variable. This will only work if the user has read access to that field.

If this is in Service Portal and the behavior is still inconsistent, a GlideAjax Script Include is the more reliable approach. It retrieves the value server-side and avoids UI timing issues, while still respecting ACLs unless explicitly elevated.

In short: it works for admin because admin bypasses security. It fails for users because of missing read access. Fix the ACLs, keep the reference variable, and the auto-population will work as designed.

 

@VIKASM535239375  - Please mark Accepted Solution and Thumbs Up if you found Helpful!

MJG

Its_Azar
Kilo Sage

Hi there @VIKASM535239375 

 

This is mostly due to ACL restrictions, not because of the catalog item or reference itself.

For admin, reference lookups work because admin bypasses ACLs. For end users, the reference field points to a custom table that they don’t have read access to, so the lookup returns no results and dependent auto-population fails.

check these: 

Add a Read ACL on the custom table allowing the intended user roles

check Read ACLs exist for the fields being referenced and auto-populated

If auto-population uses a Client Script + GlideAjax, confirm the Script Include is client-callable and If its client callable it creates a ACL for that script incldude by default. check the roles needed for that.

☑️ If this helped, please mark it as Helpful or Accept Solution so others can find the answer too.

Kind Regards,
Azar
Serivenow Rising Star
Developer @ KPMG.