none
How can I query a Salesforce object to return only specific fields (columns) RRS feed

  • Question


  • I created a connection with Salesforce. Selected the Account object which has 100s of fields (we've maxed out the allowed number of fields). This errors out with the error below (Requested URI Too Long).

    This works fine on smaller tables.

    Is there a way to create a custom query that selects only the fields (columns) I want? Either by modifying the <g class="gr_ gr_20 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling" data-gr-id="20" id="20">automatically-generated</g> query:

    let
        Source = Salesforce.Data("https://login.salesforce.com/", [CreateNavigationProperties = true]),
        Account1 = Source{[Name="Account"]}[Data]
    in
        Account1

    OR by modifying the actual SOQL request that is sent to Salesforce?

    Here's the error

    DataSource.Error: Web.Contents failed to get contents from 'https://omnitracs.my.salesforce.com/services/data/v29.0/query?q=SELECT%20Id%2CIsDeleted%2C<MANY ADDITIONAL FIELDS DELETED>(414): Request-URI Too Long
    Details:
        DataSourceKind=Salesforce
        DataSourcePath=https://login.salesforce.com/
        Url=https://omnitracs.my.salesforce.com/services/data/v29.0/query?q=SELECT%20Id%2CIsDeleted%2C<MANY ADDITIONAL FIELDS DELETED>Product_Interest__c%2CFea...


    Sunday, April 30, 2017 5:32 PM

Answers

  • Here's the answer from my same question on StackOverflow

    let
        Source = Salesforce.Data("[salesforce URL]", [CreateNavigationProperties = true]),
        Account1 = Source{[Name="Account"]}[Data],
        Account2 = Table.SelectColumns(Account1, { "First Column", "Second Column" })
    in
        Account2
    


    • Marked as answer by Rick Roesler Monday, May 1, 2017 10:43 PM
    Monday, May 1, 2017 10:43 PM

All replies

  • Here's the answer from my same question on StackOverflow

    let
        Source = Salesforce.Data("[salesforce URL]", [CreateNavigationProperties = true]),
        Account1 = Source{[Name="Account"]}[Data],
        Account2 = Table.SelectColumns(Account1, { "First Column", "Second Column" })
    in
        Account2
    


    • Marked as answer by Rick Roesler Monday, May 1, 2017 10:43 PM
    Monday, May 1, 2017 10:43 PM
  • Hi , 

    I am a Salesforce Administrator and working on a Project which involves Salesforce Object and Power Bi Integration .

    I would like to have 2 have reports in powerbi.

    - I imported all the case Records into PowerBi , However I would like to know , how to import the fields on the cases lookup fields ,eg,

    Cases - Look up - Account < Account Name , Phone etc information.

    - How can import all the email messages related to cases where web email to not blank. and of a particular record type ,.

    Monday, July 30, 2018 9:46 AM