0

I am gathering data from the LiveChatTranscript and there are multiple references to user as lookup fields. How do I pick which property I want to use as my reference to user?

LiveChatTranscript properties

LastModifiedById Lookup(User)
CreatedById Lookup(User)
OwnerId Lookup(User,Group)

query

-webroot-/query/?q=select chatkey, caseid, status,requesttime, starttime, endtime,endedby,name,ReferrerUri,platform,location, waittime,body,supervisortranscriptbody, case.description, ownerid,***ownerid.user.alias??*** from livechattranscript where chatkey = '12345'

Do I just need to do 2 queries? One to get the chat data and one to get the owner data?

3
  • 1
    1 query will suffice as owner data is lookup from LiveChatTranscript; OwnerId = The ID of the operator who participated in the chat last; for missed chats, this is a system user.; see also soql and owner relationship answer
    – cropredy
    Jun 26, 2020 at 13:51
  • PERFECT! General question, how would I know to use "owner" instead of "user" since user is the lookup definition? Jun 26, 2020 at 18:51
  • User is the target object of the lookup, Owner is the name of the relationship - please refer to Soql Relationship queries to gain an understanding of the distinction
    – cropredy
    Jun 26, 2020 at 19:02

0

You must log in to answer this question.

Browse other questions tagged .