Make all fields Read-only in ScTask

tsai25044
Tera Contributor

Hi Experts ,

If a users submits a form with a particular value in  feild like "Australia Client" or  "US client"  and submits the form, ScTask is created, then the task is continuously monitored  by a particular user for example "Abel" then all the fields in the Sctask should be read only for that particular user only.

Can anyone help me with this requirement.

Thanks & Regards, 

Saiteja.

1 REPLY 1

Jyoti Jadhav9
Tera Guru

Hi @tsai25044 ,

 

You can achieve this functionality using client side script or server side(ACL) script.

You can create UI Policy on "sc_task" table, configure the condition as per your requirement and write the script in "Execute if true" script block.

Script:

function onCondition() {
if(g_user.userID == "62826bf03710200044e0bfc8bcbe5df1") //sysid of Abel
{
    var fields = g_form.getEditableFields();
for (var x = 0; x < fields.length; x++) {
    g_form.setReadOnly(fields[x], true);
}
}
}
Screenshots:
JyotiJadhav9_0-1709041505381.pngJyotiJadhav9_1-1709041540816.png

O/P:

JyotiJadhav9_2-1709041653074.png

 

If my answer has helped with your question, please mark my answer as accepted solution and give a thumbs up.

 

Regards

Jyoti Jadhav