Can We Call a Javascript function through Personalisation block in Message Centre Template | Community
Skip to main content
Visakha
Level 2
April 25, 2019
Solved

Can We Call a Javascript function through Personalisation block in Message Centre Template

  • April 25, 2019
  • 1 reply
  • 2444 views

Hi team,

I have created few functions in Javascript code and want to use those function in personalisation block for Message Center Template.

For the same i have loaded the library and called the function.

I have created a new personalisation block with below Snippet   :

<%

loadLibrary("/cus/customizedFPLCode.js");

%>

<%= displayCurrentDateMonthYearTime(value)%>

Here customizedFPLCode.js is Javascript code name and displayCurrentDateMonthYearTime(value) is the function name.

In Message Center template i have included the above personalisation block(i.e. where i am calling Javascript code). Below is the snippet :

<%@ include view=' ' %> // entered the personalisation block name
But mail is not getting triggered after executing the Soap Request . Below error is coming :

"Error while compiling script 'content htmlContent' line 685: loadLibrary is not defined. SCR-160012 JavaScript: error while evaluating script 'content htmlContent'."

Please help me on this.

Thanks

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by DavidKangni

Hi,

It won't work as Message center server is hosted by Adobe. Until you have access to this server to load your js library, you will not be able to call it.

David

1 reply

DavidKangni
Community Advisor
DavidKangniCommunity AdvisorAccepted solution
Community Advisor
April 25, 2019

Hi,

It won't work as Message center server is hosted by Adobe. Until you have access to this server to load your js library, you will not be able to call it.

David

David Kangni