Question on Catalog Client Script

Jessica28
Tera Guru

Hello,

I need help on make all variables and fields on the RITM ready only after the RITM state changes to closed complete.

The following client script is not working for the short description, description and CI.  They are remaining editable after state is closed completed:  Thank you

 

function onLoad() {
    if (g_form.getValue('state') == '3') //check closed complete backend value once
        g_form.setVariablesReadOnly(true);
    var fields = g_form.getEditableFields();
    for (var x = 0; x < fields.length; x++) {
        g_form.setReadOnly(fields[x], true);
    }
}

 

Jessica28_0-1714093101774.png

 

Jessica28_1-1714093195183.png

 

 

2 ACCEPTED SOLUTIONS

Sandeep Rajput
Tera Patron
Tera Patron

@Jessica28 Could you please check if there are other client scripts/UI Policy working on the RITM which is making the short description and description field editable? 

View solution in original post

Jessica28
Tera Guru

Please discard my question.  It was other UI Policy is applied on the same table.  Thank You

View solution in original post

3 REPLIES 3

Sandeep Rajput
Tera Patron
Tera Patron

@Jessica28 Could you please check if there are other client scripts/UI Policy working on the RITM which is making the short description and description field editable? 

Jessica28
Tera Guru

Please discard my question.  It was other UI Policy is applied on the same table.  Thank You

Maddysunil
Kilo Sage

@Jessica28 

Could you please check if some UI policy is making these fields read only false then client script wont work on those fields.

 

Please Mark Correct if this solves your query and also mark 👍Helpful if you find my response worthy based on the impact.

 

Thanks