UI Macro on Incident form to display User/Caller Assigned Assets
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2022 08:55 AM
I have seen a UI Macro associated with user records that can display the user's assigned assets. I don't think this is out-of-the-box like the Show Related Incidents UI Macro on an Incident Form.
This allows the agent to easily associate the incident with an assigned CI/Asset. When you click on a "Show Assigned Assets" button next to a user record, it would auto-fill the CI field on the form. Does anyone have an idea of how I could create/implement something like this? It's been a while since I have seen this and I am not quite sure where I actually saw it.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2022 09:12 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2022 05:31 AM
Thank you. I'll see if that can help me get what I need and report back
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2022 09:17 AM
Hi,
You have to create UI macro for the same. where once you click on it, you have to set the CI to CI field.
<script>
function addCI(reference) {
// Hide any field messages
// get the CI / assets and set to CI field
g_form.setValue("fieldname", value);
}
else{
//Display a field error message
g_form.showFieldMsg('cmdb_ci', 'no CI associated with user, 'error');
}
}
}
</script>
Thanks,
Sagar Pagar