Make change fields read only based on Standard change template

yamunapriya
Tera Contributor

Hi All, 

Could you please help me with the following scenario:

We have to make certain fields of the change request read only for standard type change. The field values are populated based on the Standard change template (values are stored in the table std_change_template). If the value is autopopulated from template then we have to make read only. Otherwise the filed should be editable. 

Thank you 

 

 

1 ACCEPTED SOLUTION

@yamunapriya I understood now, so in this case you should modify the client script Mark standard change fields readonly adding a condition there.

Please give it a try and let me know.

If I have answered your question, please mark my response as correct and helpful so that this thread can be closed and others can be benefited by this.

Thank you very much

Cheers
Alberto

View solution in original post

11 REPLIES 11

You can use the existing one and make your own modification there.

Please give a try, it should work.

Hi @Alberto Consonn , This is old post but I am adding my question here.

I want to make short description field editable for a specific standard change template I am confused in the client script about where I should make changes; could you please help with that?

Hello @yamunapriya  

In this case please remove the filed from the "Read-only" field from the above screenshot.

So that if the value is not populated,then you have an option to fill in that colounms.

Please Mark it helpful/correct if my answer helps in any way to resolve your query.
Reach out to me if any more help required.

Regards

Yash.K.Agrawal

@Yash Agrawal : The field should be read only in case it is populated from the template. if there is no value populated, then it should be editable for the user to fill in. 

Hello,

You can also do one thing, Keep that field read-only from template properties.

And use simple client script that if the field is empty and readonly then make id editable

if(g_form.isReadOnly('fieldname') && g_form.getValue('fieldname')=='');

{

    g_from.setReadOnly(false);

}

Regards

Yash Agarwal