How is live_profile related to sys_user?

Brian Bush
Tera Guru

Does anyone know how to find a user's live_profile sys_id using the sys_user record? It seems like there must be a relationship between these tables, but it isn't obvious. I can see a table_name field on the live_profile record that is set to sys_user. I assume there is a table somewhere that relates the sys_ids.

1 ACCEPTED SOLUTION

Uncle Rob
Kilo Patron

It won't be obvious from the User record side of the equation because the reference exists on the live_profile record.



find_real_file.png



So a couple options...


1)   Search in the live profile table for a document id that matches your user's sys_id.   That should yield 1 live profile record you can get the sys_id from


2)   Build a custom relationship that matches document id to current user id.


View solution in original post

14 REPLIES 14

Hi Robert Fedoruk,



Let's just ignore the Service Portal part for now.
In a "normal" scenario how could I use javascript to get user's sys_id of the currently logged-in user?



How could I get the logged-in user's sys_id in a variable?



Best regards,



Fábio Gonçalves


var foo = gs.getUserID();     ?


Hi Robert Fedoruk,



I'm sorry, what I would like to know is:
how can I dynamically populate the field "profile" in the live_message table with the value of the currently logged-in user?



gs.getUserID() does not work since the "profile" field do not receive the user's id, but instead receives another type of if of the user, right? I just would like to know what other id is that and how can I access it using java script.



Capture.PNG




Best regards,



Fábio Gonçalves


You want the Live_Profile that has the same document ID as the logger in user's ID.


dharanikumar
Giga Guru

Hi All,

Why the live_profile photos are getting deleted automatically?

Thanks!!