Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Trying to connect to Salesforce when the object requires a reified filter

I'm connecting to Salesforce with no issues. And I can connect to an 'standard' object without issues. But certain objects require that you filter on certain fields as part of the initial query. The error you get if you run a query such as 

SELECT Id from CONTENTDOCUMENTLINK

is "ContentDocumentLink requires a filter by a single Id on ContentDocumentId or LinkedEntityId using the equals operator or multiple Id's using the IN operator." Similar errors are "a filter on a reified column is required [EntityDefinitionId,DurableId]" (when attempting to SELECT Id from FieldDefinition).

 

For the latter, a working query would be SELECT Id from FieldDefinition where EntityDefinition.name = 'Account'

 

How can I get Power Query (in Excel) to only request the latter query? I tried

let
Source = Salesforce.Data("https://test.salesforce.com", [ApiVersion=48]),
FieldDefinition = Source{[Name="FieldDefinition"]}, {[Name="FieldDefinition"]}[Data],
FieldDefinition2 = Table.SelectRows(FieldDefinition, each "EntityDefinitionId" = "Account" )
in
FieldDefinition2

 

but it only generates the column names and no data.

 

1 REPLY 1
Charles_B
Regular Visitor

I got it to work with with code, the trick was to use brackets: 

let
Source = Salesforce.Data(#"URL", [ApiVersion=48]),
FieldDefinition = Source{[Name="FieldDefinition"]}[Data],
FieldDefinition2 = Table.SelectRows(FieldDefinition, each [EntityDefinitionId] = "Account" )
in
FieldDefinition2

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.