Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Personalization in proofs

Milan_Vucetic
Community Advisor
Community Advisor

Hi all,

 

I am trying to "alive" proofs for recurring deliveries (deprecated by Adobe).

Managed to do it for deliveries without personalization, but when personalization is included an error is thrown in the proof delivery:  'Error while compiling script 'content htmlContent' line 4: targetData is not defined. SCR-160012 Javascript: error while evaluating script 'content htmlContent'.'

 

So, if used seed address in the proof, we are defining additional data (below) but still cannot recognize targetData  😕 

milanv69354962_0-1579603815729.png

 

Any idea why is refusing to use this additional data?

 

Regards,
Milan

 

 

 

1 Accepted Solution
Marcel_Szimonisz
Correct answer by
Community Advisor
Community Advisor

Hello @Milan_Vucetic 

Without seeing the details normally this literally means that the delivery target does not have targetData available. You can make small workaround when you initialize the variables at the end of the delivery source code such as.

 

This error happened to me when I was using native JS functions such as targetData.string.toString().indexOf() even though those variables were coming to the delivery.

<%
targetData.variable1;
targetData.variable2;
...
..
..
%>

 

BR,

Marcel

View solution in original post

3 Replies
Marcel_Szimonisz
Correct answer by
Community Advisor
Community Advisor

Hello @Milan_Vucetic 

Without seeing the details normally this literally means that the delivery target does not have targetData available. You can make small workaround when you initialize the variables at the end of the delivery source code such as.

 

This error happened to me when I was using native JS functions such as targetData.string.toString().indexOf() even though those variables were coming to the delivery.

<%
targetData.variable1;
targetData.variable2;
...
..
..
%>

 

BR,

Marcel

View solution in original post

Milan_Vucetic
Community Advisor
Community Advisor

Hi @Marcel_Szimonisz ,

 

where these variables should be initialised exactly?

If you mean on XML source code, there are two tabs Entity and Context but wherever is put an error is raised.

 

Thanks in advance.

 

Regards,

Milan

Marcel_Szimonisz
Community Advisor
Community Advisor
In the delivery template -> Source -> very end after <html> tag