Skip to main content
added 250 characters in body
Source Link
Deployment Failure
  • 4.9k
  • 16
  • 89
  • 190

Using RetrieveSalesforceObjects I'm able to retrieve specified objects data, from what I understand this function uses the SC SOQL API to retrieve data. Using SOQL I'm able to query data like Account.Name from my Order.

However doing this using RetrieveSalesforceObjects, like this:

SET @Order = RetrieveSalesforceObjects(SObject,"Id, OrderNumber, Account.Name","Id", "=", RecordId)

Is this simply not possible or am I doing something wrong?

Edit: I’m aware I can deconstruct the various IDs and retrieve each object, the purpose of this question is the see if I can do this with one retrieve command using related fields feature from SOQL which the ampscript retrieve function is based on.

Using RetrieveSalesforceObjects I'm able to retrieve specified objects data, from what I understand this function uses the SC SOQL API to retrieve data. Using SOQL I'm able to query data like Account.Name from my Order.

However doing this using RetrieveSalesforceObjects, like this:

SET @Order = RetrieveSalesforceObjects(SObject,"Id, OrderNumber, Account.Name","Id", "=", RecordId)

Is this simply not possible or am I doing something wrong?

Using RetrieveSalesforceObjects I'm able to retrieve specified objects data, from what I understand this function uses the SC SOQL API to retrieve data. Using SOQL I'm able to query data like Account.Name from my Order.

However doing this using RetrieveSalesforceObjects, like this:

SET @Order = RetrieveSalesforceObjects(SObject,"Id, OrderNumber, Account.Name","Id", "=", RecordId)

Is this simply not possible or am I doing something wrong?

Edit: I’m aware I can deconstruct the various IDs and retrieve each object, the purpose of this question is the see if I can do this with one retrieve command using related fields feature from SOQL which the ampscript retrieve function is based on.

Source Link
Deployment Failure
  • 4.9k
  • 16
  • 89
  • 190

Can I retrieve related data using RetrieveSalesforceObjects?

Using RetrieveSalesforceObjects I'm able to retrieve specified objects data, from what I understand this function uses the SC SOQL API to retrieve data. Using SOQL I'm able to query data like Account.Name from my Order.

However doing this using RetrieveSalesforceObjects, like this:

SET @Order = RetrieveSalesforceObjects(SObject,"Id, OrderNumber, Account.Name","Id", "=", RecordId)

Is this simply not possible or am I doing something wrong?