UI Macro to display CIs assigned to a user

<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">

Assets currently assigned to this user:
<a href='' onclick="event.preventDefault();showdiag();">click here</a>

function showdiag(){
  var req_for=g_form.getValue('var_requested_for');
  if (req_for!=''){
var dialog = new GlideDialogWindow('show_list');
dialog.setTitle('Assets assigned to user');
dialog.setPreference('table', 'cmdb_ci_list');
dialog.setPreference('sysparm_view', 'default');
var query = 'assigned_to=' + req_for;
dialog.setPreference('sysparm_query', query);


Popular posts from this blog

GlideRecord setValue

URL link in addInfoMessage