Make records read-only in Service Portal- Copy of Data Table widget

Uttam Sai
Tera Contributor

Hi Team,

 

I am using Copy of Data Table widget in Service Portal to display outage records. Here , if i click on any one of the records , it is opening the record and fields are editable. What changes do we need to make the fields "read-only".

 

Thank you 

 

 

1 ACCEPTED SOLUTION

SanjivMeher
Kilo Patron
Kilo Patron

You can create an onLoad client script with below script and UI type as Service Portal

 

var fields = g_form.getEditableFields();
for (var x = 0; x < fields.length; x++) {
g_form.setReadOnly(fields[x], true);
}

 


Please mark this response as correct or helpful if it assisted you with your question.

View solution in original post

1 REPLY 1

SanjivMeher
Kilo Patron
Kilo Patron

You can create an onLoad client script with below script and UI type as Service Portal

 

var fields = g_form.getEditableFields();
for (var x = 0; x < fields.length; x++) {
g_form.setReadOnly(fields[x], true);
}

 


Please mark this response as correct or helpful if it assisted you with your question.