How to create a UI Page for Incident Table

shaik_irfan
Tera Guru

Hello,

 

I am able to create a UI Page can anyone please help me how to retrive the Incident Records to the UI PAge ?

 

find_real_file.png

1 ACCEPTED SOLUTION

nakuldani
Tera Contributor

Hi,

You can use jelly script components.

try below code in UI Page -> HTML.

<g:evaluate>
var gr = new GlideRecord('incident');
gr.query();
</g:evaluate>
<table id='incidents'>
<j:while test='${gr.next()}'>
<tr>
<td>${gr.number}</td>
<td>${gr.category}</td>
<td>${gr.assignment_group}</td>
..
..(you can write as many columns as you want)
..
</tr>
					
</j:while>
</table>

Thanks.

View solution in original post

9 REPLIES 9

I don't think you'll be able to embed a ui page in the article itself very easily. I think your best bet is to provide a link in the article out to the default list, a ui page, or a service portal page where they can see your list.

If they're consuming these articles through a service portal page, you could just edit the page and add a widget that displays your list next to the article.

Currently we still in a process of Service Portal so unable to go with this option. Only option we see is through UI PAge.

nakuldani
Tera Contributor

Hi,

You can use jelly script components.

try below code in UI Page -> HTML.

<g:evaluate>
var gr = new GlideRecord('incident');
gr.query();
</g:evaluate>
<table id='incidents'>
<j:while test='${gr.next()}'>
<tr>
<td>${gr.number}</td>
<td>${gr.category}</td>
<td>${gr.assignment_group}</td>
..
..(you can write as many columns as you want)
..
</tr>
					
</j:while>
</table>

Thanks.

Hi, anytime reference field is added, it shows its sys_id. Any idea how to change it to proper name?

@OtaS2209 

 

Use ${gr.getDisplayValue('assignment_group')}