user criteria is not working in employee center

Anusha Anus
Tera Expert

Hi,   @Mark Roethof 

I created quick links and showing up in both TEST and DEV of employee center.
Added user criteria that, if only  custom field "code" is  not 8, quick link should be displayed else it should not be visible
test();

function test() {
    var user = new GlideRecord('sys_user');
    var username = gs.getUserName();    
    user.addEncodedQuery('u_code!=8^u_dept_codeIN01,02^user_name =' +username);
    user.query();
    if (user.next()) {
        return true;
    } else
        return false;
}

Its working in DEV. But not working in TEST instance. Quick link is getting displayed even  it returns false.
 
Need help on this
 
Thanks in advance,
Anusha.
1 ACCEPTED SOLUTION

Anusha Anus
Tera Expert

available for of Quick links are getting stored in "sn_ex_sp_quick_link_user_criteria_mtom" . So we need to open that record in this table and need to add explicitly to update set. This worked.

View solution in original post

4 REPLIES 4

Mani A
Tera Guru

put logs for encodedQuery what it is printing

Anusha Anus
Tera Expert

Hi @Mani A , @Ankur Bawiskar 

 

Quck links available for is not getting captured in update set. How its get captures. I added explicitly to update set. Quck link is getting captured bt not available for.

Anusha Anus
Tera Expert

available for of Quick links are getting stored in "sn_ex_sp_quick_link_user_criteria_mtom" . So we need to open that record in this table and need to add explicitly to update set. This worked.

Anusha Anus
Tera Expert

available for of Quick links are getting stored in sn_ex_sp_quick_link_user_criteria_mtom. So we need to open that record in this table and need to add explicitly to update set. This worked.