Personalization in proofs | Community
Skip to main content
Milan_Vucetic
Level 9
Jan 21, 2020 10:53 AM UTC
Solved

Personalization in proofs

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  😕😕 

 

Any idea why is refusing to use this additional data?

 

Regards,
Milan

 

 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Marcel_Szimonisz
Marcel_SzimoniszAccepted solution
New Participant
Jan 22, 2020 8:51 AM UTC

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

3 replies

Milan_Vucetic
Level 9
Jan 23, 2020 10:40 AM UTC

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

Translate
Marcel_Szimonisz
New Participant
Jan 23, 2020 12:30 PM UTC
In the delivery template -> Source -> very end after <html> tag
Translate
Marcel_Szimonisz
Marcel_SzimoniszAccepted solution
New Participant
Jan 22, 2020 8:51 AM UTC

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

Translate