For Custom Related Lists Edit button is not vissible and working

Ashwin Perumal1
Tera Contributor

Hello All,
We have created a custom related lists tab for approvers where we have 'New' button by default in related list. Similarly we also need a edit button so tried to configure using list control but it didn't work as expected and it was mentioned in snow article for custom related lists we can't have OOB edit button. so we created a custom edit ui action global and made it visible in our custom related list tab

AshwinPerumal1_0-1721744331637.png

 

The problem here is when clicked on the edit ui action it displays the list of users to be selected and after selecting and saving the record the users added through edit button are not displayed in custom approvers tab.

 

AshwinPerumal1_1-1721744452355.png

 

i have added two users above but it was not displayed in the approvers tab it was empty even after adding from edit ui action.

UI Action ---took copy of OOB edit ui action 

Condition: current.canCreate() && !RP.getListControl().isOmitEditButton() && RP.isRelatedList() && !RP.isManyToMany() && !RP.isInDevStudio()

Script:

var uri = action.getGlideURI();
var path = uri.getFileFromPath();
uri.set('sysparm_m2m_ref', 'sysapproval_approver');
uri.set('sysparm_collection_related_file', 'sys_user');
uri.set('sysparm_collection_key', 'sysapproval');
uri.set('sysparm_collection_related_field', 'approver');
uri.set('sysparm_stack', 'no');
uri.set('sysparm_query', '');
action.setRedirectURL(uri.toString('sys_m2m_template.do'));
 
Can anyone pls help me to understand why approvers are not displayed in related lists when added through edit button. Thanks in advance
0 REPLIES 0