How to add Edit related list action button
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2025 03:53 AM
Hi,
im trying to add Edit related list action button in SOW on sys_user_grmember related list that on sys_user_group record. Can anyone help and share the configuration and the script?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2025 04:05 AM - edited 03-31-2025 04:11 AM
Hi @Alon Grod
Please follow the below community article to create/enable "Edit" button on the related lists in workspaces.
https://www.servicenow.com/community/developer-articles/solved-workaround-for-quot-edit-quot-buttons...
Hope this helps.
Regards,
Siva
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2025 04:59 AM
for workspace it's treated differently.
this article from Maik will help you create that
SOLVED: Workaround for "Edit ..." buttons on Related Lists of Workspaces
Also check this link
Workspace for a custom app: buttons
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2025 12:59 AM
Hope you are doing good.
Did my reply answer your question?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2025 05:21 AM
Hello @Alon Grod ,
I was able to create a "Edit" button by following below steps on "sys_user_grmember" table in Workspace.
1. Go to "Now Experience Framework" -> "Declarative Actions" -> "Related List Actions".
2. Create "New" related list action and fill details like below :
3. "Save" and click on Advance view to get "Conditions" section. Fill the condition as below :
parent.canWrite() && parent.getTavleName() == 'sys_user_grmember'
4. In Client Script paste below code. Which maps the relationship between User and Group.
function onClick() {
var _strLink =
'/sys_m2m_template.do?' +
'sys_is_list=true&' +
'sys_is_related_list=true&' +
'sysparm_collectionID=' + g_form.getUniqueValue() + '&' +
'sysparm_query=&' +
'sysparm_referring_url=' + location.pathname + '&' +
'sysparm_stack=no&' +
'sys_target=sys_user_grmember&' +
'sysparm_m2m_ref=sys_user_grmember&' +
'sysparm_collection=sys_user&' +
'sysparm_collection_key=user&' +
'sysparm_collection_label=Group&' +
'sysparm_collection_related_field=group&' +
'sysparm_collection_related_file=sys_user_group&';
var win = top.window.open(_strLink, '_self');
win.focus();
}
5. Save and Done. You will be able to see the edit button on SOW.
If this solution helped resolve your issue, please consider marking it as helpful or correct.
This will assist others in finding the solution faster and close the thread.