We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

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

Ankur Bawiskar
Tera Patron

@surajbiswal 

screenshots please

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

surajbiswal_0-1771259624257.png

 

Hi @Ankur Bawiskar  Did you get a chance to look into the above screenshot.

@surajbiswal 

your code is wrong.

you are using client script type Declarative action but your script contains server side methods and hence not working.

see this how to create custom Edit button

SOLVED: Workaround for "Edit ..." buttons on Related Lists of Workspaces 

💡 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  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

Hi @Ankur Bawiskar  I have already tried to use the above but no luck.

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();
}