Revert to new option on change form

Madhura Ambede
Tera Contributor

Revert to New option on change :
When create a New change, we get choices in state field "New/Assess/Canceled". 
Once change move to assess, If I click on revert to new option, it go to New state again and showing choices in state field "New/Assess/Authorize/Implement/Review/Closed/Canceled"
I want to modify this choice to "New/Assess/Canceled" to Revert new option as well.

OR

State field should be non-editable in all phases

AND Approvals should be triggered again when click on revert to New.

 

I tried to make field non editable using below client script but this is not working as expected.


function onLoad() {
//Type appropriate comment here, and begin script below

var pk=g_form.getTableName();
if(pk=="change_request")
{
g_form.setReadOnly('state',true);
}
}

 

This script is well working PDI. but not in company environment.

2 REPLIES 2

Murthy Ch
Giga Sage

Hey @Madhura Ambede 
Writing a script on state field is not recommended because it's extends from TASK table. Instead, create a dictionary override on state field for change_request table to make a filed read-only.

Steps:
Open any change record and click on configure dictionary on STATE field. Open existing dictionary override record if any under related lists and make the changes like below image:

MurthyCh_0-1711230762745.png

Post here if any questions. Happy to help:)

Thanks,
Murthy

Madhura Ambede
Tera Contributor

@Murthy Ch 
Thank you for your solution and it is working for making the state field un-editable.

But previous approvals should be move to cancelled and it should be re-triggered. This is not happening right now.

Kindly assist.