Query business rules based on Logged on user = one of List user

Community Alums
Not applicable

Hello expert. Need help on 'before query' business rules. Stuck for days now 😞

I have a requirement where if Logged on user is one of the user in the List below, the user can see the record.

See attached image.

Problem: when user logged in, the user sys_id is not same in any of the list even the user exist in the list. 

Any help is highly appreciated!!

find_real_file.png

find_real_file.png

7 REPLIES 7

Kalyani Jangam1
Mega Sage
Mega Sage

Hi, you can check like below

if(gs.getUserID()==current.u_division_head) {

// match then code return

}

Community Alums
Not applicable

Thanks, Kalyani. Tried and not working. The sys_id are not same since current.u_division_head is returning the sys_id from sys_user_grmember.

Hi Is division head reference of sys_user_grmember table???

Community Alums
Not applicable

Yes, Kalyani. Division head reference of sys_user_grmember table and allows mutiple users.