I want to send emails using a Salesforce Report which is based on Custom Report. I have created an AMP Script Code in order to fill some fields but I don't receive the email. This is the code:
%%[ VAR @rs, @row, @value, @date, @DateP1 SET @date = AttributeValue("TargetX_SRMb__Application__c:Id") SET @rs = RetrieveSalesforceObjects('TargetX_SRMb__Application__c', 'Payment_Deadline_1__c', 'Id', '=', @date) IF RowCount(@rs) == 1 THEN SET @row = Row(@rs, 1) SET @value = Field(@row, 'Payment_Deadline_1__c') SET @DateP1 = FormatDate(@value,"l","","en-gb") ELSE SET @value = 'error' ENDIF ]%%
And the report is:
If I test the email using a Data Extension with the name of Salesforce fields, the email is well mapped but when I send the email to the report population, the email doesn't arrive.
Is anyone having the same issue? There is a way to solve it? I can't create a profile attribute with Application Id because it isn't in the Contact Object.
Can somebody help me?
Thank you, Anna