How do you disable list editing for a particular table? When a change request is in a certain state

Joshua Comeau
Kilo Sage

Wanting to know the capabilities on how to restrict inline editing on from a list view when a certain request state is saying: 

so if its in schdeduled/implement or something it cant be edited?

JoshuaComeau_0-1680282674842.png

 

I created and ACL so that on the form when the state is scheduled you cannot change the planned start date

but 

when viewing on the list view they are able to edit?

 

 

2 REPLIES 2

Ashir Waheed
Kilo Sage
Kilo Sage

Hi @Joshua Comeau 

 

If you want to disable List View Editing, Follow the steps.

1. Click on any column on record list view, Navigate to Configure->List Control.

AshirWaheed_0-1680291585516.png

2. Disabled the List view Editing

AshirWaheed_1-1680291656182.png

3. Now you won't be able to edit fields in the list view.

 

You can also achieve this by creating ACL.

1. Create a ACL with List Edit operation. Choose you desired table.

AshirWaheed_2-1680291930625.png

2. You need to write script to return false to stop the access.

3. You can add filter condition on when the List Edit should be disabled

AshirWaheed_3-1680292030286.png

 

Now You will be able to achieve you requirement.

 

Regards,

Ashir Waheed

 

Matt Cordero1
Tera Guru

@Joshua Comeau , here is a good example of how to Allow/Prevent list_edits using an ACL, on the Change Request table.  The screenshot shows the setup for the list_edit ACL, on the Change Request table.

MattCordero1_0-1731957776474.png

 

 

 

var result = false;

// IF the Change Request's State is "NEW", allow ACL list edits.
// Otherwise, prevent list edits.
if (current.state == '-5') {
    result = true;
}

answer = result;

 

 

The Advanced script details how to allow/prevent list edits, based on the Change Request's state.  In this case, allow List Edits IF the Change Request's state is "New" (value of -5 for us).  Otherwise, prevent the ability to perform the list edit.