How Display a table list View In UI Page.

mayank15
Tera Contributor

Hey I have a requirement where i need to show the associated work notes using the UI action on the table and if the service desk users wants he will be able to delete selected worknotes or records from the sys_journal_field table.

How this can be achievable?  can we show the table list view in the UI page like we can do in the service portal and delete specific entries from there ? 

PLEASE HELP AND LET ME KNOW IF THERE IS ANY OTHER APPROACH THAT I CAN FOLLOW. 

 

2 REPLIES 2

Sriramachandra
Tera Guru

please follow below thread it would be more helpful

https://community.servicenow.com/community?id=community_question&sys_id=9c530325dbd8dbc01dcaf3231f96...

 

please mark as help full or mark as correct anaswer

 

Saurabh singh4
Kilo Guru

Hi

You can try this

You need change the code of iframe like below code getting Incident list based on Caller

 

 

 

 

 

<g:ui_reference name="requester_id" query="active=true" table="sys_user" id="requester_id" value="${gs.getUserID()}" displayvalue="${gs.getUser().getName()}"/>
<button class="button" style="margin-left:5px" id="getList" onclick="getIncList();">Get User Incidents</button>

 

<div id="targetList">      
<iframe src="incident_list.do?sysparm_query=caller_id=javascript:gs.getUserID()" style="min-height:400px;width:100%;" scrolling="no" frameborder="0"></iframe>
</div>

<script>
        function getIncList(){
                  var caller = document.getElementById('requester_id').value ;
                  var newIframe = '<iframe src="incident_list.do?sysparm_query=caller_id='+caller+'" style="min-height:400px;width:100%;" scrolling="no" frameborder="0"></iframe>' ;
                  document.getElementById('targetList').innerHTML =newIframe ;
        }
</script>

 

Please mark my answer correct and helpful,I this helps you in any way.

Thanks in advance