Announcement

Collapse
No announcement yet.

localMap Error

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • localMap Error

    I am using this line of code in a javascript transformer function:

    localMap.put('report', report);

    When I deploy the channel, I get the following error:

    Caused by: org.mozilla.javascript.EcmaError: ReferenceError: "localMap" is not defined. (a84ae884-7636-4954-b0f6-aa52d59aa232#20)
    at java.lang.Throwable.<init>(Throwable.java:181)
    at java.lang.RuntimeException.<init>(RuntimeException .java:32)
    at org.mozilla.javascript.RhinoException.<init>(Rhino Exception.java:50)

  • #2
    Re: localMap Error

    Does it happen even after you defined the javascript variable?
    Code:
    var report;
    or
    Code:
    var report = "";
    If yes, could you try with different variable name?
    Code:
    var tempReport;
    localMap.put(&#039;report&#039;, tempReport);

    Comment


    • #3
      Re: localMap Error

      After doing some further testing, the error occurs after I try to add the ${report} variable to the document writer template destination. When I publish, the error gets thrown. If I don&#039;t include it on the template, then the errors do not get produced.

      I tried with different variable names and with assigning values and not assigning values.

      Comment


      • #4
        Re: localMap Error

        LocalMap is no longer valid in 1.4 - you can use the channelMap or the connectorMap.

        -Chris
        Chris Lang

        Comment


        • #5
          Re: localMap Error

          Thanks chrisl. That would explain the error.

          Comment

          Working...
          X