How to add 'New' 'Edit' button in related list workspace

Arun_Manoj
Mega Sage

Hi,

 

I'm trying place  'New' 'Edit' button in related list in risk event to add the compliance case ,Native view there button but in the WS view I can't find out the button here. Please help me to sort the issue.

Arun_Manoj_0-1753270805539.png

 

Thanks

Arun

 

3 REPLIES 3

Utpal Dutta
Tera Guru

Hi Arun,

Can you check if 'New' & 'Edit' button UI action has below checkboxes checked in UI action record?

 

UtpalDutta_0-1753271159740.png

 

If my answer helps then please mark it Helpful and Accept the solution.

 

Thanks

Ankur Bawiskar
Tera Patron
Tera Patron

@Arun_Manoj 

check this, you might have to create new button for workspace

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

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

Shruti
Mega Sage
Mega Sage

Hi,

1. Create "New" button

a. Navigate to NowExperience Framework -> Related List action

b. Create a new action

Shruti_0-1753272762013.png

 

Shruti_1-1753272778439.png

 

2. Create "Edit" button

a. 

Shruti_2-1753272818319.png

 

Client script 

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=sn_comp_case_compliance_case&' +
        'sysparm_m2m_ref=sn_comp_case_compliance_case&' +
        'sysparm_form_type=o2m&' +
        'sysparm_collection=sn_risk_advanced_event&' +
        'sysparm_collection_key=parent&' +
        'sysparm_collection_label=Compliance+Cases&' +
        'sysparm_collection_related_field=&' +
        'sysparm_collection_related_file=sn_comp_case_compliance_case&';

    var win = top.window.open(_strLink, '_self');
    if (win) {
        win.focus();
    }
}