Custom Content Block – Show Service Catalog Links

Users wanted a widget to quickly access the Service Catalog from their dashboard. I created this content block that can be added to dashboards.

<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">

	


<g:evaluate object="true">
	


var grCat = new GlideRecord("sc_cat_item");
grCat.addEncodedQuery("type!=bundle^sys_class_name!=sc_cat_item_guide^type!=package^sys_class_name!=sc_cat_item_content^published_refISEMPTY^active=true^categoryISNOTEMPTY^sc_catalogsLIKEe0d08b13c3330100c8b837659bba8fb4^category!=496a3a7e0a0a0bc00089b39df14eb56e^ORcategory=NULL^hide_sp!=true^category!=9368deaedb567f40064a5ff0cf9619a3^ORcategory=NULL^category!=2435ddf5dbda9814ee5b5eea4b96195a^ORcategory=NULL^RLQUERYsc_cat_item_user_criteria_mtom.sc_cat_item,=00,m2m^ENDRLQUERY");
grCat.orderBy('name');
grCat.query();

</g:evaluate>

<table id="table_id" width="100%">
	
	 <tr id="customTR">
		 <th colspan="2"  id="customTH">		 
			 <center><a style= "color:white"  href="/esc"  target="_blank"> Employee Center Link </a> </center>
			 		  </th> 
		 </tr>
		 		 
 <tr id="customTR">
 <th id="customTH">
 <b > <center> Catalog Item </center> </b>
 </th>
<th id="customTH">
  <b> <center>Category</center> </b>
 </th>

 </tr>
 <j:while test="${grCat.next()}">
		   
 <tr id="customTR">
 <td id="customTD">
	
<a href="/esc?id=sc_cat_item&amp;sys_id=${grCat.sys_id}"  target="_blank"> ${grCat.name} </a>
 </td>

<td id="customTD">	
<a href="/esc?id=sc_category&amp;sys_id=${grCat.category}"  target="_blank"> ${grCat.getDisplayValue('category')} </a>
 </td>
 </tr>
</j:while>
 </table>
   <style>

 #customTH{
 
 	 border: 1px solid #000000;
 	 background-color: #1B3A6B;
	   color: white;
 	 font-family: "Times New Roman";
 
  text-align: left;
  padding: 2px;
 	 font-size:16px
 	 }
	   
	   
 #customTD{
 	border: 1px solid #000000;
 	color: black;
 	 font-size:13px;
  text-align: left;
  padding: 2px;	  
 
  
 }
	   
	   
 
 #customTR:nth-child(even) {
  background-color: #E8E8E8;
 }
 
 </style>

	     
</j:jelly>

Latest Posts