Custom Edit Button under change request in SOW is not clickable

surajbiswal
Tera Contributor

I have created a Edit action button in RITM --> related list--> change request on SOW view

But the button is not clickable User can't edit and add the existing CR in ritm and also can't remove the CR.

18 REPLIES 18

@surajbiswal 

the link has approach to create custom Edit button and it has worked for many people

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

@surajbiswal 

I will have to see if I get time to try that in my PDI

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

Riteshv32564711
Tera Contributor

First check the permission relationship is stored in sc_req_item.change_request or a custom m2m table and check user having write access to that table and edit ACLs .If the ACL denies update/delete, Workspace disables buttons.

please provide screenshot to help you in better way.

Shruti
Giga Sage

Hi @surajbiswal 

Navigate to Declarative actions -> Related list actions

Create a UI action on change_request table and paste below code to the client script

function onClick() {
    var _strLink = '/sys_m2m_template.do?' + 'sys_is_list=true&' + 'sys_is_related_list=true&' + 'sys_target=change_request&' + 'sysparm_checked_items=&' + 'sysparm_collection=sc_req_item&' + 'sysparm_collectionID=' + g_form.getUniqueValue() + '&' + 'sysparm_collection_key=parent&' + 'sysparm_collection_label=Change+Requests&' + 'sysparm_collection_related_field=&' + 'sysparm_collection_related_file=change_request&' + 'sysparm_collection_related_relationship=change_request.parent&' + 'sysparm_collection_relationship=&' + 'sysparm_fixed_query=&' + 'sysparm_form_type=o2m&' + 'sysparm_group_sort=&' + 'sysparm_list_css=&' + 'sysparm_m2m_ref=change_request&' + 'sysparm_query=&' + 'sysparm_referring_url=' + location.pathname + '&';
    var win = top.window.open(_strLink, '_self');

    win.focus();
}
 
Shruti_0-1771328091870.png

 

Hi @Shruti I tried above but when clicked on the edit button nothing happened.