Expand my Community achievements bar.

Accelerate your Campaign learning with the Adobe Campaign Mentorship Program 2023!

Recipient is not defined


Level 5


I am using a javascript that should work both for RECIPIENT and LISTS in this way:



function isEmpty(val){

    return (val === undefined || val == undefined || val == null || String(val).length <= 0) ? true : false;


var user;


     user = String(recipient.crmId);


     user = String(targetData.crmId);



I am testing this script with 2 cases:

1) Query on recipient + delivery #1 -> it works

2) Query on list + delivery #2 -> it does not work

I get this error when I am using a list (target mapping of the delivery is "external file" and there is no "recipient" inside the delivery template):
JST-#ID# Error while compiling script 'content htmlContent' line 6186: recipient is not defined. SCR-#ID# JavaScript: error while evaluating script 'content htmlContent'

so I'm guessing that the issue is inside the IF above (not working as I were expecting).

Anyone could tell me how to solve it?

Thank you,

Jean-Serge Biron





Adobe Campaign

0 Replies