Before query business rule to restrict access

Sahar_Kaizer
Tera Contributor

Hi,

I've implemented a Before Query business rule to govern access to feedback records. The objective is to allow users to view only the feedback records they've created, except for those with the 'mac_departmentTL' role who should view all records.

This is what I have tried:

Sahar_Kaizer_0-1703601286505.png

 

However, I've encountered an issue where users without the 'mac_departmentTL' role cannot see any records created by them.

 

Thank you for your help!

Sahar.

1 ACCEPTED SOLUTION

Saurabh Gupta
Kilo Patron
Kilo Patron

Hi @Sahar_Kaizer 
In line number 6, can you please replace gs.getUserID() with gs.getUserName().

C

If the provided solution meets your needs, kindly consider marking it as helpful and accepting it as the solution . This helps others who may have similar questions.

 


Thanks and Regards,

Saurabh Gupta

View solution in original post

2 REPLIES 2

Saurabh Gupta
Kilo Patron
Kilo Patron

Hi @Sahar_Kaizer 
In line number 6, can you please replace gs.getUserID() with gs.getUserName().

C

If the provided solution meets your needs, kindly consider marking it as helpful and accepting it as the solution . This helps others who may have similar questions.

 


Thanks and Regards,

Saurabh Gupta

Thank you it worked!