Loading

RetrieveSalesforceObject AMPScript Function Changes

Дата публикации: Jul 31, 2025
Описание

Beginning with the Summer '24 release, the RetrieveSalesforceObject AMPScript function will have a max retrieval limit of 1,000 records when used in email sends.

Below are some frequently asked questions about this change:

How is this limit applied?

The limit is for each usage of the RetrieveSalesforceObjects function within an email send.

How can emails that previously hit the limit be identified?

Please contact support for assistance on identifying these emails. 

What actions need to be taken by a Marketing Cloud admin?

Review use case to determine if more than 1,000 records pulled via RetrieveSalesforceObjects is necessary. If so, the recommendation is to bring the data into Marketing Cloud via sync instead.

Does this change apply to CloudPages?

This currently does not apply to the RetrieveSalesforceObject AMPScript function being used on a CloudPage.

What happens if no changes are made?

The email send will only include first 1,000 records requested by RetrieveSalesforceObjects calls (this will be based on the 1000 records with the newest SystemModstamp value). The email send will not fail. 

Why is this change happening?

This functionality change ensures optimal performance for email sends.

Решение

RetrieveSalesforceObjects() calls resolve as a SOQL query which can be replicated in a Salesforce Org using the Developer Console.

 

This example:

RetrieveSalesforceObjects('Object', 'FieldToRetrieve', 'QueryField', 'fieldOperator', 'SearchString')

Equates to:

SELECT FieldToRetrieve FROM Object WHERE QueryField (fieldOperator) SearchString

 

For example:

RetrieveSalesforceObjects('Contact', 'FirstName', 'Email', '=', 'test@testemail.com')

Equates to:

SELECT FirstName FROM Contact WHERE Email = 'test@testemail.com'

 

To retrieve the total number of records on an object you can adjust the SOQL query like this:

SELECT COUNT(FirstName) FROM Contact WHERE Email = 'test@testemail.com'

Номер статьи базы знаний

000396651

 
Загрузка
Salesforce Help | Article