function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

SOQL how to query even owner name



I tried

SELECT e.Subject, e.OwnerId, (select Name from User where id=e.OwnerId) FROM Event e where subject = 'TEST'


but it doesn't work

If I run this query below >

SELECT Subject, OwnerId, Owner.Name FROM Event where subject = 'TEST'


The Name column will show Name value as vlookup and by clicking on it I can see the name.

What if I want to see directly in my query the value, the name of the user.




Your query is right, the UI you get is an aspect of the tool you're using, not the query.


Thanks for the quick answer but there is no way to have the name of the owner instead of this lookup clickable value "name"





Use a different tool, soqlx works well for this.