How to remove related links from a view

Gemma4
Mega Sage

Hi everyone,

Is it possible to remove Related Links from a view? I understand you can from a form but is there an easy option to remove it from just one view? 

 

related links.png

 

 

Is it possible to simply change this under the view created under related list.

Change view 

Select Configure Related List

 Configure.png

Then Remove the items 

 

Remove.png

 

 

 

 

 
 
1 ACCEPTED SOLUTION

Ohh...So it is the Related List and not Related Links.

To remove the related list you can just remove it from Configure->Related List like you are doing which will remove it from you view which is 'TEST VIEW'.


Please mark this response as correct or helpful if it assisted you with your question.

View solution in original post

7 REPLIES 7

SanjivMeher
Kilo Patron
Kilo Patron

Related Links are UI actions which are marked as Form Links. You need to find the UI action and add condition to hide it for this table or add UI action Visibility to hide it from a view. If there is no more Ui action to show, it will hide the Related Links text as well


Please mark this response as correct or helpful if it assisted you with your question.

Hi @SanjivMeher 

Thank you for the feedback but I'm still a little unclear. I reviewed all the UI actions for the table sc_task and am not able to locate anything that would display or hide related links. I even checked my pdi which is only using out of the box ui actions and can't find it there either. Any suggestions? 

thanks

 

Search for the UI action 'Include to Update Set' and add appropriate conditions


Please mark this response as correct or helpful if it assisted you with your question.

Thank you @SanjivMeher for the feedback but I think there is some confusion with how I explained things. I am trying to remove the tabs below related links. see screenshot above. I need to remove the tabs below related links (affected ci's approvers and group approvers) I feel like I achieved this by selecting  Configure Related List. Is this correct? 

If not below is the UI Action details you mentioned. However I'm not really sure what would  need changed in that. 

 

UI Action Include to Update Set

Condition gs.hasRole('admin')

 

addToUpdateSet();

 

function addToUpdateSet(){

                //Get current URL for return

                var url = GlideSession.get().getStack().bottom();

               

                //Set to force update and save current record

                current.setForceUpdate(true);

                current.update();

               

                //Initialize updateManager

                var updateManager = new GlideUpdateManager2();

               

                //If record is already included in update sets on save, do nothing

                var currTable = current.getTableName();

                if(currTable.startsWith('wf_') || currTable.startsWith('sys_ui_') || currTable == 'sys_choice' || current.getED().hasAttribute('update_synch') ||current.getED().hasAttribute('update_synch_custom')){

                                //Do nothing

                }

                //Else, add the record into the current update set

                else{

                                updateManager.saveRecord(current);

                }

               

                //If the current record *has* attachments, add those

                if (current.hasAttachments()){

                                addAttachments(current, currTable);

                }

               

                //If the current record *is* an attachment, add the chunks

                if (currTable == 'sys_attachment'){

                                var attach_doc = new GlideRecord("sys_attachment_doc");

                                attach_doc.addQuery("sys_attachment", current.sys_id.toString());

                                attach_doc.orderBy("position");

                                attach_doc.query();

                                while (attach_doc.next()) {

                                                updateManager.saveRecord(attach_doc);

                                }

                }

               

                //Display confirmation

                var currentSet = new GlideRecord('sys_update_set');

                currentSet.get(gs.getPreference('sys_update_set'));

                gs.flushMessages(); //Flush to avoid multiples when list updating

                gs.addInfoMessage('Record(s) added to update set ' + currentSet.name + '.');

                action.setRedirectURL(url);

}

 

//Add any attachments to the update set

function addAttachments(record, table){

                //Process the main sys_attachment record

                var attach = new GlideRecord("sys_attachment");

                attach.addQuery("table_name", table);

                attach.addQuery("table_sys_id", record.sys_id.toString());

                attach.query();

                while (attach.next()) {

                                var updateManager = new GlideUpdateManager2();

                                updateManager.saveRecord(attach);

                               

                                //Process each sys_attachment_doc chunk

                                var attach_doc = new GlideRecord("sys_attachment_doc");

                                attach_doc.addQuery("sys_attachment", attach.sys_id.toString());

                                attach_doc.orderBy("position");

                                attach_doc.query();

                                while (attach_doc.next()) {

                                                updateManager.saveRecord(attach_doc);

                                }

                }

}