4

The documentation indicates that it should return a String. But, when the following query

SELECT Id, Name, Profile.UserLicense.Name FROM User

is executed in Developer Console, the result returned for that column is [object Object].

0

1 Answer 1

1

From experience, I think the dev console can only display parent information, not grandparent information. As such, it shows it as a general object.

i.e. if you run the following, a string will be displayed:

SELECT Id, Name, Profile.Name FROM User

To get the License name, you can run the following code in the Execute Anonymous window. This shows that the value is being returned, so if you need the values in code, it should work.

List<User> users = [SELECT Id, Name, Profile.UserLicense.Name FROM User LIMIT 1];

system.debug(users[0].Profile.UserLicense.Name);

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .