Get Value of user_image type field

Renuka8
Kilo Guru

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.

1 ACCEPTED SOLUTION

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;


View solution in original post

7 REPLIES 7

Yes i did.


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;


Renuka8
Kilo Guru

Hi Bhavesh,



Thanks i got it, i Just passed the sys_id from the UI action and after retrieving the value in UI page i used .getDisplayValue to the variable and it worked fine.