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 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.
