Data360 Analyze

 View Only
  • 1.  Passing value from one node to another in Salesforce URL request

    Posted 03-11-2021 12:49

    We are trying to pass a list of ID's (from output node) into an "Input" Node for Salesforce query. We are getting an error stating: 

    Tried:

    SELECT
    ACCOUNTID
    ,FIRSTNAME, PHONE
    FROM CONTACT
    where ACCOUNTID = 'ID'

    Error:  Execution ErrorError occurred during executing request: where ACCOUNTID = 'ID' ^ ERROR at Row:12:Column:7 invalid ID field: ID Record number: 1.

    Tried:

    SELECT
    ACCOUNTID
    ,FIRSTNAME, PHONE
    FROM CONTACT
    where ACCOUNTID = '{ID}'

    Error occurred during executing request: where ACCOUNTID = '{ID}' ^ ERROR at Row:12:Column:7 invalid ID field: {ID} Record number: 1.

    Tried:

    SELECT
    ACCOUNTID
    ,FIRSTNAME, PHONE
    FROM CONTACT
    where ACCOUNTID IN{ID}

    Execution ErrorError occurred during executing request: where ACCOUNTID IN{ID} ^ ERROR at Row:12:Column:18 Bind variables only allowed in Apex code Record number: 1.

    This is a Salesforce query. Direct queries to database we have no issues. Is there a specific syntax for Salesforce queries when passing an input field?



  • 2.  RE: Passing value from one node to another in Salesforce URL request

    Employee
    Posted 03-16-2021 07:39

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    If you look at the WHERE expression, it's looking for where ACCOUNTID = 'ID' -- that means it's only valid if the value of ACCOUNTID is literally 'ID' -- I'm not sure if that's normal for Salesforce, but ACCOUNTID sounds like it should be a number, not the literal 'ID'. Maybe that's the problem?

    I found documentation on the SOQL WHERE clause here -- might be useful as well: https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_sosl_where.htm?search_text=where



  • 3.  RE: Passing value from one node to another in Salesforce URL request

    Employee
    Posted 03-16-2021 08:28

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Another thing I noticed is that it looks like you're trying to reference what I imagine is an input column named "ID" that has the values, and you're trying to replace it with the 'ID" field. That won't work in the Salesforce Node. The "From Field" option for the query means the entire query needs to be input from a field, not just one field on its own.

    You'll need to make the entire query in a Transform Node (if you're outputting from one right now, you can just use that one) and reference the field with the entire query there.