All fields should be readonly once the state is changed to Closed Complete on catalog task

saichandu rayal
Kilo Contributor

When state is closed complete, it should make all the fields read only.

1 ACCEPTED SOLUTION

Chandra Sekhar6
Tera Guru

Write the following client script :

 

if(g_form.getValue('state') == 3){

var x = g_form.getEditableFields();

for(i = 0; i<x.length; i++){

g_form.setMandatory(x[i], false);

g_form.setReadOnly(x[i], true);

}

}

View solution in original post

5 REPLIES 5

Chandra Sekhar6
Tera Guru

Write the following client script :

 

if(g_form.getValue('state') == 3){

var x = g_form.getEditableFields();

for(i = 0; i<x.length; i++){

g_form.setMandatory(x[i], false);

g_form.setReadOnly(x[i], true);

}

}

Chetan Mahajan
Kilo Sage
Kilo Sage

Hi Saichandu,

                     You can make this possible by ACL and Client script. ACL is the best practice and you doesn't need any code by using ACL.

Kindly mark correct and helpful if applicable 

SumanthDosapati
Mega Sage
Mega Sage

Hi,

You can write an UI policy on catalog task page as below

Condition : State is closed complete.

In UI policy actions, add fields whatever you need and set readonly to true.

 

Regards,

Sumanth

Aman Kumar S
Kilo Patron

@saichandu rayala 

Best way to achieve this would be to Add condition in you write ACL for table, where you can update the Condition as state is not closed

This is how you can protect editing of closed tickets.

 

Feel free to mark correct, If I answered your query.

Will be helpful for future visitors looking for similar questions 🙂

Best Regards
Aman Kumar