Do you know if it's possible to get owner.name instead of owner.id via


You can query like this way:


Refer Query

| improve this answer | |

Specify the "fields" parameter:


You can specify multiple fields with commas, all fields supported by SOQL will work here (so, up to five levels deep in relationships).

Output Example:

  "attributes" : {
    "type" : "Account",
    "url" : "/services/data/v41.0/sobjects/Account/001500000154s0CAAQ"
  "Owner" : {
    "attributes" : {
      "type" : "User",
      "url" : "/services/data/v41.0/sobjects/User/00550000000wTdSAAU"
    "Name" : "Brian Fear"
  "Id" : "001500000154s0CAAQ"
| improve this answer | |
  • what is the better approach? SOQL or Entity fields? – Santanu Boral Feb 27 '18 at 16:53
  • 1
    @SantanuBoral Both methods are viable, though one saves you writing a query when you already know the Id. I'd personally use Entity when possible; it's basically shorthand for writing the query, and returns a slightly less dense JSON object. You can use whichever you prefer. Obviously, if you don't know the ID, or need multiple records, you'd prefer a query. – sfdcfox Feb 27 '18 at 17:01
  • all other fields are excluded, is it possible included them +extra fields like owner.name? – AndrewG Feb 28 '18 at 10:11
  • 1
    @AndrewG Nope. Either all fields, or specify your own, as far as I can tell. Which is kind of unfortunate. You can still call a describe, get all the fields, then use the Entity resource to get the record; it's still slightly easier than using SOQL, if you ask me. – sfdcfox Feb 28 '18 at 15:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.