Forum Discussion

kapilnath's avatar
kapilnath
Frequent Visitor
3 years ago

Issue connecting Salesforce Object Content Documen tLink

I am trying to connect to a salesforce object ContentDocumentLink and I get the following error. 

4 Replies

  • kapilnath , need more details here. also an error in text format. Seem like you are using = where more than one value is coming and you need in clause or equivalent code

    • kapilnath's avatar
      kapilnath
      Frequent Visitor

      This is the error I get when I try to connect to Salesfroce Object Content Document Link. 

  • Hi kapilnath were you able to find a solution? As a workaround, maybe you can try to test your connection with a 3rd party connector. I've tried windsor.ai, supermetrics and funnel.io. I stayed with windsor because it is much cheaper so just to let you know other options. In case you wonder, to make the connection first search for the Salesforce connector in the data sources list:

     

     

    After that, just grant access to your Salesforce account using your credentials, then on preview and destination page you will see a preview of your Salesforce fields:

     

     

    There just select the fields you need. It is also compatible with custom fields and custom objects, so you'll be able to export them through windsor.  Finally, just select PBI as your data destination and finally just copy and paste the url on PBI --> Get Data --> Web --> Paste the url. 

     

  • Hi kapilnath,


    That error is expected with the native Salesforce connector. ContentDocumentLink is a special object in Salesforce — the API won’t let you query it without a WHERE filter on ContentDocumentId or LinkedEntityId. Power BI’s built-in connector issues an unfiltered SELECT, so Salesforce rejects it with an “implementation restriction” error.


    Full disclosure: I’m with the team behind Power BI Connector for Salesforce (a Salesforce-native app), and this is exactly the kind of object it’s built to handle. You can include ContentDocumentLink in a data source — on its own or joined with parent objects like Account and ContentDocument — pick the fields you need, and the app generates a ready-to-use Power Query (M) formula. You just paste it into Power BI Desktop → Get Data → Blank Query, and the data loads without the filter error.


    Here it is working — selecting ContentDocumentLink (ContentDocumentId, LinkedEntityId, ShareType, Visibility) alongside Account and ContentDocument:

     

     

    And the resulting data source ready to use in Power BI:

     

    Happy to share more detail if it helps.

     

    Best regards,

    Metrica Team.