Controlling content in slushbucket on Relationship related list

thomaj3
Kilo Contributor

Dear All

I have a task record that is being used as an overview for the child tasks with certain aspects being bubbled up to the parent. When a document is added to a child task, a related list at the parent level shows the 'relationship'.

I can see the available documents in my slushbucket, when clicking edit from the child task - document (related list) and everything shows correctly, and when viewing from the parent then you can see the added document.

When clicking the edit from the parent - document (related list), the slushbucket doesn't display anything, and when I click the add filter complains about no table defined.

Firstly, I'd like populate the slushbucket with available documents and then my end goal is to, from the parent enable the edit button to add a document, but set the link in the m2m table to the child task and therefore by passing the need to drill down into the child task and perfom the same action.

The child task to link the document to is determined upfront (task of certain type).

Thanks for taking the time to read this post, I hope it makes sense... 🙂

4 REPLIES 4

thomaj3
Kilo Contributor

Dear All

I managed to solve my issue.

I modified the UI Action Edit, it intercepts the request and customises the collection parameters appropriately based on the related list calling the UI Action.



thomaj3


Hello,

I know it's been a while but can you recall which values you changed under the 'Edit' global UI action?

What we're trying to achieve is the ability to select the same approver multiple times but the slushbucket only allows you to select the approver once.

Here's the OOB script for one to many Edit slushbucket:


var uri = action.getGlideURI();
var path = uri.getFileFromPath();
uri.set('sysparm_m2m_ref', current.getTableName());
uri.set('sysparm_collection_related_file', current.getTableName());
uri.set('sysparm_form_type', 'o2m');
uri.set('sysparm_stack', 'no');
action.setRedirectURL(uri.toString('sys_m2m_template.do'));


Thank you 🙂


Daniel Draes
ServiceNow Employee
ServiceNow Employee

Hi Arlen,


it's been again a while


Did you solve this mistery? I am trying to achieve the same right now. Thanks!


Ahhh. found it myself.



I should not use a related list to modify these references but the 'field'. This will trigger a different editor allowing multiple entries for the same type as well as other table fields to be added for modification.