- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-26-2014 11:49 PM
I have a user_image type field in incident form, i want to get the value of this field basically the photo which is uploaded and onclick of ui action link ui page pops up to show this photo. Please suggest how can i get the value of this user_image field.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-27-2014 02:45 AM
Sorry for confusion. I missed single quote in Id name.
var id = document.getElementById('image.sys_user.photo').value;
window.location = 'https....instance_name.service-now.com/sys_attachment.do?sys_id='+id;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-26-2014 11:59 PM
Rephrasing the question: While calling a UI Page through UI Action link how can I pass a parameter to UI page of "type user_image field"

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-27-2014 01:27 AM
Let us take an example of user record where you already have a profile photo field of type user_image.
Write a sample onLoad client script on this user record.
var id = document.getElementById(image.sys_user.photo).value;
window.location = 'http....instance_name.service-now.com/sys_attachment.do?sys_id='+id;
This will show a popup to save or Open the loaded image. Let me know if this makes sense.
Regards,
Bhavesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-27-2014 01:57 AM
Hi Bhavesh,
I am unable to get the value using below line of code. Can you please explain the same.
document.getElementById(image.sys_user.photo).value

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-27-2014 02:40 AM
Have you uploaded the photo in the user record?