- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2023 08:14 AM
Hi All,
I am passing sys_id of the user which was fetched in the client script to below script includes and storing it in variable called userID.
For admins, In this query its fetching the records correctly for both active and inactive. But if user is inactive the data is not getting fetched for non-admins through catalog.
How to query even inactive users for non-admins ? Please help
Script Include:
getAssetdetails: function(){
var userID = this.getParameter('sysparm_user_name');
var almHW = new GlideRecord('alm_hardware');
almHW.addQuery('assigned_to',userID);
almHW.addQuery('install_status',1);
almHW.addQuery('substatus',null);
almHW.addQuery('model_category','88uu99886537373883883');
almHW.query();
almHW.getRowCount();
..................etc etc
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2023 09:03 AM - edited 05-31-2023 09:50 AM
Hi @Harsha M V ,
Its "user query" business rule. I am attaching screenshot of this business rules as well. I think this business rule might be conflicting with your script. You may try by deactivating this BR in dev and check if the results are coming as expected even for non admins or not and then if it works you may modify this BR as per your use case however its OOB BR and OOB components are not recommended to be modified. In case if this does not work, check if script include is executing or not in case of non admins as roles could be specified in ACL on the client callable script includes and if non admins does not possess that role, the script include would not execute for them.
Amish Ranjan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-01-2023 12:49 AM
Hi @AmishRanjan2 ,
Yes the business rule is restricting the inactive user query.
Thank you so much for the help.
This business rule is in global domain. My issue is domain specific and can i create a new copy of buisness rule for my domain and do changes to the script so that query happens for inactive users as well?