Best way to track user changes to "My Profile"?

SC10
Kilo Guru

Has anyone seen a good way to track user changes to their "My Profile" and kick off requests/workflows from those changes?

Example: An end user changes their Department information. This would then log an automated request with a workflow that shoots off tasks to Server Admins to update the user's information in Active Directory, task to Admin to update user's desk location, etc etc. Similar activities to those.

Looking for anyone else who might have done something like this, or seen it in action.


Thanks.

1 ACCEPTED SOLUTION

Michael Ritchie
ServiceNow Employee
ServiceNow Employee

Mike's wizard approach is fine too, but here is an example of what I was referring to:


Create a new catalog item to accept the updates.   In my simple example I prompt for mobile phone and department.   Each of these variables has a default value of:


Mobile Phone: javascript:gs.getUser().getMobileNumber();


Department: javascript:gs.getUser().getDepartmentID()



These functions can be found here: http://wiki.servicenow.com/index.php?title=Getting_a_User_Object#gsc.tab=0



Then create a UI action to call this new catalog item from the user profile.   I set mine as a button and the script to run is basically the URL link from your service catalog.   I went to the catalog and right clicked on the item and chose "copy link address" in Chrome.   Once you have that, the script in the UI action should look similar to the following:


action.setRedirectURL("com.glideapp.servicecatalog_cat_item_view.do?v=1&sysparm_id=9f1b256f0f2c460088641d2be1050ed1&sysparm_link_parent=e15706fc0a0a0aa7007fc21e1ab70c2f&sysparm_catalog=e0d08b13c3330100c8b837659bba8fb4&sysparm_catalog_view=catalog_default");




Once setup, here is the user profile with fields read only and button:


find_real_file.png




Then once you click Update Profile, this shows up:


find_real_file.png



From there your workflow can do whatever you need like update the user's record in ServiceNow and also create tasks to your fulfillers to update the external databases.


View solution in original post

9 REPLIES 9

Mike Allen
Mega Sage

The table is sys_user.   Add business rules that state, when field changes, start a particular workflow:


Workflow Script - ServiceNow Wiki


The issue with this is if a user is making multiple changes to the same field. I was thinking some sort of scheduled task that fires off a workflow, that runs hourly?


Michael Ritchie
ServiceNow Employee
ServiceNow Employee

Why not make the my profile fields read only so they cannot update it directly there, but have a button on the form for them to provide updates that launches them into a catalog request to make changes.   Once they submit that, various tasks can go out, etc.



You should also look into Orchestration too as you could automate the backend updates as well.


Is there an easy way to dump all of the values of one's user profile, into new fields onto a page, so they can be modified and then coded to track if an update has been done on a field?



With what you said, the user would click a UI action, which would load up a catalog item which would present (a copy?) of all of their profile information, and allow them to make whatever changes they felt necessary. Then depending on what they changed, different tasks would fire off via a workflow.



Orchestration will have to wait for another time as we are still onboard with manual changes in our operational environment.