List edit acl on related list dependant on task.state

Mike62
Tera Guru

I am trying to stop all editing of a related list when an incident is closed or cancelled. The related list is 'related services' which appears on Incident and I want to make the list view of related services read only when incident is in one of two states. I cant get this to work and it seems to ignore what task.state is. Any help is appreciated

Mike62_0-1701440193031.png

 

1 ACCEPTED SOLUTION

Mike62
Tera Guru

Thanks for everyone's input. The answer was to manually script it:

 

if(current.task.sys_class_name == 'incident'){

   if(current.task.state == 7 || current.task.state == 8){

       answer = false;

View solution in original post

10 REPLIES 10

AshishKM
Kilo Patron
Kilo Patron

HI @Mike62 ,

The attached image shows that ACL is not active.

 

-Thanks,

AshishKMishra


Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution

I know. I turned it off because it blocks all list edit regardless of incident state

Shane J
Tera Guru

As far as I know list_edit ACL is all or nothing - you can't set it to only work on individual records.

That being said, I'd think the proper write ACL would work, as it should apply regardless how the record is being accessed.

Thanks for your reply. I tried a write ACL and its still stopping aditing on other states.