ACL script. How to access field information

runnah
Kilo Contributor

Hi,

I am creating an ACL script to prevent users with a custom role from viewing more than the records that they have created. I need to check the field in my table, user, to see if it is equal to the current logged in user. The user value is stored in my table as their display name rather than sys id, so I am using gs.getUserDisplayName(); to compare their values. I have seen examples of people using current.field_name to access information from a record, but I am still unsuccessful. Attached below is what I am currently working with. Please comment if you have any recommendations. Thank you!

acl.PNG

1 ACCEPTED SOLUTION

Hey Runna,



Change the drop down value in name field to "None" and it should work. Please refer below screenshot and let me know if you are blocked.


Screen Shot 2016-08-04 at 12.04.18 PM.png


View solution in original post

9 REPLIES 9

Hi,



I am actually requiring my custom role, but not via script.


requiresrole.PNG


Unfortunately, this still does not work even though all of the logic seems to be correct.


Kalaiarasan Pus
Giga Sage

Is it just me or you are also not able to see the screenshot of b-rad ?


I am able to view it.


Hey Runna,



Change the drop down value in name field to "None" and it should work. Please refer below screenshot and let me know if you are blocked.


Screen Shot 2016-08-04 at 12.04.18 PM.png


Thank you! That resolves the issue!