Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
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.
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