List CI's owned by selected user
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-11-2016 05:18 AM
Hello Everyone,
I want to list all CI's owned by a selected user on a leaver form.
This is how I would like it to work:
1. User Opens our User Leaving catalog item and selects the name of the user that is leaving in the 'impacted_user' variable.
2. Either on the same page or in a popup window, I want to list the CI's that the person leaving is an owner of, with the option to set a new owner for each. (If the user is not an owner of any CI's then nothing would be shown)
Could someone please let me know how this is possible, I think some form of UI page would be the best bet, I just cant get my head around it.
Many Thanks
Harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-11-2016 05:35 AM
I think this will be a complex one if you want to have a dynamic list with update capabilities.
Instead, why don't you let the Catalog Item be submitted and then in the RITM, decommision/deactivate the CI's related to the user. This can be shown as a related List in the RITM ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-11-2016 05:40 AM
Hi Santosh,
It doesnt necessarily need to be a dynamic list with update capabilities. Even if it was just listed in a UI page, I could have a seperate variable to choose one new owner for all the CI's.
The CI's will need to remain active but with a new owner.
Thanks
Harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-11-2016 05:50 AM
Then you can do the following:
1.
Have a UI Page with only one Div:
<div id = 'ci_data'></div>
2. Write a OnChange Catalog Client script on the 'impacted_user' field.
This is where you have to write a lot of stuff:
a. Use AJAX to get the list or html data from the server.
b. use jQuery or javascript to populate the result in the div present in the UI Page.
e.g document.getElementById('ci_data').innerHTML = '<Result from the AJAX call>';
or
$j('#ci_data').inner('<result from ajax call>');
Ajax Guide: http://wiki.servicenow.com/index.php?title=GlideAjax#gsc.tab=0
Or You can just have a button, that should open a Pop Up to show the List of CI's and you can do this using GlideDialogWindows. This is much easier and clean
GlideDialog: http://wiki.servicenow.com/index.php?title=Displaying_a_Custom_Dialog#gsc.tab=0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-11-2016 05:55 AM
Hi Harry,
Hope all's well?
Consider the following: user a is leaving and has 3* assets assigned. Do you want to re-assign all (3) to person b? OR
potentially assign 1*asset to person b, 1* asset to person c, 1* asset to person d?
Are you thinking about restricting who can be assigned the assets? ie only within same department/management hierarchy/cost centre?
For simplicity...you could easily flag that ALL assets owned by person a should be assigned to person b (and restrictions on who person b can be).
To show all assigned assets of person b..you could simply have a ref field using a adv.ref.qualifier on person a field that calls a script include to populate.
A bit vague..but a few process things to consider there.
hope it was of some help.