Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

All users are unable to see the newly created field/column in the sys_user table

SN2024
Tera Contributor

Hi,

 

I created a new field on sys_user table called "Deactivated" to record the date and time stamp when the account sets from active to false. I used BR to update the Date and time on the "Deactivated" field.

 

This works and records the date and time but the issue is if I set the account to false, users are unable to see of find the user record that is set to false.

 

Script used for BR:

var gdt  = new GlideDateTime();

current.setValue("u_deactivated_on",gdt);
current.update();

So far I have figuered out this BR is the issue. Can someone please help and suggest what I need to add in this BR so inactive user account who have date and time stamp are visible?
If I deactivate this BR I can see the user accounts
 
Thank you for your help.
10 REPLIES 10

J Siva
Kilo Patron
Kilo Patron

Hi @SN2024 

If you deactivate the BR which you have created, are you able to see the inactive user records?

Also, if possible please share the screenshot of your business rule configuration...

You should also check the catalog item variable configuration and its filter condition..

Regards,

Siva

SN2024
Tera Contributor

Hi Siva,

 

Thank you for your response.

Yes If I deactivate the BR, and impersonate as another user to test  then I can see the deactivated users.
For Catalog item, even If I remove all the filters and just set it to reference sys_user,other users can't see the deactived users that have date and time stamp if this BR is active.

@SN2024 Only "Query" type business rules can control the visibility of data on the UI. Other types of business rules do not have any impact on the user interface. Additionally, as a best practice, you shouldn't use current.update() within the business rule script.
So, I don't think the issue is caused by your business rule.

check if there are any custom "Query" type business rules configured.

SN2024
Tera Contributor

Thank you for this useful information. I have found this Query BR and if I deactivate it, it solves this issue.

 

But is there other way to make it work without making any changes this BR or without deactivating it?

screenshot attached