Is it possible to create acl to allow delete for those who created the change request record?

Ronald11
Tera Expert

Hello,

Do you have any idea how to create an acl so that deletion of change request record would only be allowed if the user that created the change request is the one that will delete it?

I tried setting the following role condition but it is not working.

find_real_file.png

Is my condition wrong or do you have any idea on how to make this work.

Thanks in advance

 

1 ACCEPTED SOLUTION

Martin Ivanov
Giga Sage
Giga Sage

You need an advanced scripted condition with this line of code

answer = gs.getUser().getName() == current.sys_created_by;

Please mark Correct and Helpful if my answer helps you resolve your issue. Thanks!
Martin Ivanov
Community Rising Star 2022


Please mark Correct and click the Thumb up if my answer helps you resolve your issue. Thanks!
Martin Ivanov
ServiceNow MVP 2023, 2024

View solution in original post

5 REPLIES 5

Community Alums
Not applicable

Hi Ronald,

Refer to this thread :https://community.servicenow.com/community?id=community_question&sys_id=efc0ef61db992700f0612183ca96...

Mark my answer correct & Helpful, if Applicable.

Thanks,

Sandeep

Martin Ivanov
Giga Sage
Giga Sage

You need an advanced scripted condition with this line of code

answer = gs.getUser().getName() == current.sys_created_by;

Please mark Correct and Helpful if my answer helps you resolve your issue. Thanks!
Martin Ivanov
Community Rising Star 2022


Please mark Correct and click the Thumb up if my answer helps you resolve your issue. Thanks!
Martin Ivanov
ServiceNow MVP 2023, 2024

This works for me. Thanks

Aman Singh_
Kilo Sage

Hi,

 

Assuming you must be using DELETE UI action for deleting records, why don't you restrict the visibility of that UI Action as per your business requirement.

Make that DELETE UI action visible to the Change Requester only.

 

Thanks,

Aman