how to make the CMDB table field read only for all view in sow but ui 16 editable.

reenak446674965
Tera Contributor

how to make the CMDB table field read only for all different view view in sow but ui 16 editable. we have toaltal 305+class , which will not be recommended to write the client script for each class.

could you please help on this. 

3 REPLIES 3

Ankur Bawiskar
Tera Patron

@reenak446674965 

you can write onLoad client script on parent cmdb_ci table and run it for sow view only

AnkurBawiskar_0-1767778782855.png

 

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi Ankur,

I am getting error while saving view SOW.

reenak446674965_0-1767779183483.png

 

 

@reenak446674965 

then try this logic with Global checkbox as True

function onLoad() {

    var url = top.location.href;
	// check if this is sow
    if (url.indexOf('/now/sow') > -1) {
        g_form.setReadOnly('fieldName', true);
    }

}

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

 

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader