2

I am trying to retrieve all the column names from Salesforce by SOQL Query that I get via Pentaho as well with the following code

select QualifiedApiName
from FieldDefinition 
where EntityDefinition.DeveloperName='Account'

Pentaho lists 65 fields, the query only 50. The following fields are missing (list contains 16 instead of 15 fields for some reason)

BillingStreet
BillingCity
BillingState
BillingPostalCode
BillingCountry
BillingLatitude
BillingLongitude
BillingGeocodeAccuracy
ShippingStreet
ShippingCity
ShippingState
ShippingPostalCode
ShippingCountry
ShippingLatitude
ShippingLongitude
ShippingGeocodeAccuracy

Would you mind telling me the SOQL code I need in order the get all the 65 fields? Would appreciate that!

notAnExpert
  • 123
  • 1
  • 5
  • 15

2 Answers2

4

Go to Developer Console,
Open Account Object

enter image description here

New window will open, select all the fields(Ctrl A or drag)
and click on Query
Below window will have all the fields queried

enter image description here

Ali Azam
  • 2,047
  • 1
  • 16
  • 25
1

The fields you've listed are components of compound fields, specifically the ShippingAddress and BillingAddress compound Address fields.

What you want is most likely to write your query against EntityParticle in the Tooling API, which should give you parity. But fundamentally it's important to know that neither list is wrong - your query and Pentaho are just using APIs that have slightly different definitions of what a field is, in the complicated situation around compound fields.

You could also write REST API calls against the Describe API, if you're not limited to using just SOQL.

David Reed
  • 2,522
  • 2
  • 16
  • 16
  • Thanks a lot! The following did the trick `SELECT Name FROM EntityParticle WHERE EntityDefinition.QualifiedApiName ='Account'` – notAnExpert Nov 30 '20 at 20:14