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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

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
New Member

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
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors