OOTB function nms.eventHisto.GetMirrorUrl doesn’t return any URL or returns incorrect URL

In a workflow with a JS activity, when calling the Out-of-the-box (OOTB) function nms.eventHisto.GetMirrorUrl, it doesn’t return any URL or returns an incorrect URL. Add quotes around the event histo id in the function call.

Description description

Environment

Campaign Classic v8

Issue/Symptoms

In a workflow with a JS activity, when calling the Out-of-the-box (OOTB) function nms.eventHisto.GetMirrorUrl, it doesn’t return any URL or returns an incorrect URL.

Steps to reproduce:

  1. Create a workflow with a JavaScript activity.

  2. In the JavaScript activity, add the following code, replace 1234567 with an event histo id existing on your ACC marketing instance. Preview the event history to ensure that it has a working mirror URL.

    logInfo('URL: ' + nms.eventHisto.GetMirrorUrl(1234567));

  3. Execute the workflow and check the logs:

    • Either no URL is returned

      • OR The URL returned doesn’t match the URL displayed in the preview tab for the event you called the function on.

Resolution resolution

Solution:
Add quotes around the event histo id in the function call.

The call should look like:
logInfo('URL: ' + nms.eventHisto.GetMirrorUrl("1234567"));

Cause
The function doesn’t work because it is called with a long parameter.

recommendation-more-help
3d58f420-19b5-47a0-a122-5c9dab55ec7f