function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Andreas ChristidesAndreas Christides 

Marketing cloud : Email Preview and Test DE error --> "The specified attribute or custom object field name was not found for this client."

Hi all, 

I'm quite new to AMPScript and don't get why the following error occures when trying to preview and test the email the template based Email with a specific DE : 
 error message occuring when Preview and test with a DE
“The subscriber preview failed to generate. Review the details, correct all issues, and try again.
The specified attribute or custom object field name was not found for this client.
Function Call: RetrieveSalesforceObjects('Campaign','Code_CE__c','ID','=',campaignID)
Attribute or Field Name: campaignID”. 

Here is the AMPScript code of the Template-Based Email : 
%%[
    SET @SF_CodeCE = ""
SET @rs = RetrieveSalesforceObjects('Campaign','Code_CE__c','ID','=',campaignID) 
 if rowCount(@RS) == 1 then
      SET @SF_CodeCE= field(row(@rs,1),1)
ELSE 
     SET @SF_CodeCE=" "
ENDIF
 ]%%

What should I modify on the DE so that it will work ? 

Thanks a lot.