- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-03-2016 09:15 AM
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.
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-03-2016 09:36 AM
It won't be obvious from the User record side of the equation because the reference exists on the live_profile record.
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-28-2017 06:31 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-28-2017 10:47 AM
var foo = gs.getUserID(); ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-29-2017 12:50 AM
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.
Best regards,
Fábio Gonçalves
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-29-2017 02:53 AM
You want the Live_Profile that has the same document ID as the logger in user's ID.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-17-2022 02:51 AM
Hi All,
Why the live_profile photos are getting deleted automatically?
Thanks!!