Enrich MirrorPageURL onto the workflow schema

Darren_Bowers

MVP

17-06-2020

I wanted to enrich the MirrorPageURL for each recipient onto the workflow after the delivery has completed so I can save it in an external system. I've tried using GetMirrorURL from the database functions and that doesn't do anything (besides there being NO documentation on how it works)

So I am trying using JS to reconstruct the MirrorPage URL but I cant seem to get the broadLog-id out of the post-delivery schema:

DarrenOrigin_0-1592440165538.png

This is the query I am using:

 

 

get: {
    records: function( recordsToFetchPerBatch,currentStartLine ) {
      var query = xtk.queryDef.create(  
        <queryDef schema={vars.targetSchema} operation="select" lineCount={recordsToFetchPerBatch} startLine={currentStartLine}>
          <select>
            <node alias="broadLog-id" expr="@broadLog-id" />
          </select>
          <where>
            <condition expr="@id IS NOT NULL" />
          </where>
        </queryDef>
      ).ExecuteQuery();

      return query;
    }
  },

 

But I get the following error:

SCR-160012 Javascript&colon; error while evaluating script 'WKF1279/js'.
SOP-330011 Error while executing the method 'ExecuteQuery' of service 'xtk:queryDef'.
XTK-170036 Unable to parse expression '@broadLog-id'.
Attribute 'broadLog' unknown (see definition of schema 'Email delivery with proof and seed address (temp:deliveryRecurring32)').

Any ideas on how to query the broadLog-id from the temp schema?

Or a better way to enrich the Mirror Page URL onto the schema?

Accepted Solutions (1)

Accepted Solutions (1)

Darren_Bowers

MVP

17-06-2020

Ok looks like there is an issue trying to read an attribute with a dash "-" in the attribute name in using QueryDef.

I enriched the @broadLog-id value into another attribute on the schema with no dash in the name and it seems to have fixed the queryDef. The MirrorPageUrl seems to generate properly now.

Answers (0)