How to hide a user record from ALL Requests

GB14
Kilo Patron

We have a TEST account in the sys_user table, and we would like to hide it to be used for requests. 

 

We do not want to disable the account for some specific reasons. 

 

Any suggestions will be appreciated. 

 

Thanks,
G

1 ACCEPTED SOLUTION

Robbie
Kilo Patron
Kilo Patron

Hi @GB14,

 

We can hide certain records by leveraging a before Query business rule at the table level.

See the below screen shots to help you implement on the sys_user table and adjust accordingly.

 

To help others (or for me to help you more directly), please mark this response correct by clicking on Accept as Solution and/or Kudos.


Thanks, Robbie

 

Screenshot 2024-06-27 at 16.45.52.pngScreenshot 2024-06-27 at 16.45.43.png

 

 

(function executeRule(current, previous /*null when async*/) {

	current.addQuery("user_name", "!=", "abel.tuter"); //Change the 3rd parameter abel.tuter with the userID of the user you wish to hide

})(current, previous);

 

View solution in original post

8 REPLIES 8

Anurag Tripathi
Mega Patron
Mega Patron

If there is a TEST account, you should deactivate it.

In production you should not have an account with name TEST.

-Anurag

Hello Anurag,

 

We need this account for a very unique internal purpose, hence we cannot disable it. 

We are okay if the account shows up on the incidents as our teams have been communicated to not use it but for the requests, customers like to use this test account 🙂

 

 Thanks You, 
G

The next option would be to add the user to be excluded via the reference qualifiers.

You will need to do it on individual fields I'm afraid.

-Anurag

Robbie
Kilo Patron
Kilo Patron

Hi @GB14,

 

You have a few options available to you.

As this is for testing, make sure this change is not captured in any open update set and remains environment specific.

From a holistic view, you could update the system property: glide.sc.request_for.query which filters the requested for variable where you can select users.

The default value is active=true

You could update this value to active=true^user_name!=abel.tuter^ORuser_name=NULL

(With this example I am filtering out the user ID abel.tuter. You can update this accordingly)

 

Alternatively, update the requested_for variable itself on specific rquests/where its used or if its used within variable sets.

 

To help others (or for me to help you more directly), please mark this response correct by clicking on Accept as Solution and/or Kudos.


Thanks, Robbie