gs.getUserID() need basic understanding.

naresh1019
Mega Expert

Hello Guys .....Can you please guide with the following requirement.

1) I have a form with with only two date fields.

2) I want to create ACL to update the entries depending on the users who creaetd it .

3) find_real_file.png

The following sript condition is not working.

4) please guide me ,

1 ACCEPTED SOLUTION

tvani
Tera Contributor

Hi Naresh,



You can use the below script as sys_created_by stores the user_name of the user.



if(current.sys_created_by.equals(gs.getUserName())


return true;


View solution in original post

21 REPLIES 21

Gaurav Bajaj
Kilo Sage

Hi,



Please check the sys_created_by field type.


For task, it is a string field



It's better to go by opened_by instead of created by as its the reference field for user table.




find_real_file.png


tvani
Tera Contributor

Hi Naresh,



Try giving the script as below, without storing the result in a variable. Let me know if it works.


find_real_file.png



Thanks & Regards,


Vani.


Nope Not working.


naresh1019
Mega Expert

i dont have opened_by field in my table.


naresh1019
Mega Expert

find_real_file.png


These are the only fields, how can i access opened_by field