show inactive users records in catalog

Harish27
Kilo Guru

Hi,

I have a field Requested on Behalf on a catalog item which is a reference field to the sys_user table. By default, we will be able to see only active users in the Requested field, But I also want to see inactive users in the requested field.

1. One solution for this is to give the user_admin role to a particular user(not the best solution though) and we are not allowed to modify the OOTB business rule as well.

I heard that some business rule is locking the user session to only show active records.. Don't know much abt that.

 

So how we achieve this? Any help would be massively appreciated..

Thanks!!

1 ACCEPTED SOLUTION

Harish27
Kilo Guru

Thank you ankur and jaspal. I have written and article on this https://community.servicenow.com/community?id=community_article&sys_id=e2f2878bdbd4ec1011762183ca961... . This solves my requirement.

View solution in original post

18 REPLIES 18

Jaspal Singh
Mega Patron
Mega Patron

Hi Harish,

 

OOB system shows only Active-True users & which is becasue of Query business rule names: User Query on user (sys_user) table.

Only option I see that meets your requirement is to alter this rule else it is not possible. Kindly follow link for a detailed update (1-2 lines) to be made on the script.

If business is against modifying the rules then it has to be communicated that OOB system shows only Active & is configured that way. If there is a need then only option is to alter/cutomize it.

Hi Harsih,

 

As suggested there even after applying all possibilites you will certainly have to modify Query Business rule: User Query on User table for making those possible options work.

So, rather than trying multiple other options you can simply alter the business rule as highlighted above & a link for a check.

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Harish,

you can make this business rule not work for your catalog item

Determine the url and check allow or disallow

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Hi Ankur,

 

Currently what am doing is to call a script include which contains u.setWorkflow(false) on the catalog onchange script.

But this doesn't seem to be working. 

Can you please help me on the the URL part which you have mentioned.

Also please Note: We aren't allowed to modify OOB user Query business rule.

 

Thanks.