Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Insert mirror link into a database table via workflow javascript

Level 2
Level 2



I am using Adobe Campaign Classic v7 build 8936. My objective is to insert the mirror link of a message into a table in the database.


I have built a workflow which queries broadlogid and deliveryid from the nmsbroadlogrcp table and then I have written the following javascript:


var deliveryData = xtk.queryDef.create(
<queryDef schema="temp:query" operation="select">
<node expr="@id"/>
<node expr="@id1"/>
try {
var data = deliveryData.ExecuteQuery();

} catch(e) {


for each(var value in data)
    var mirrorPageURL =,value.@id);

    var queryXML = <campmirrorlinkinfo _operation="insert" xtkschema="ybl:campmirrorlinkinfo"/>;

    /*var queryXML = <campmirrorlinkinfo _operation="insert" xtkschema="ybl:campmirrorlinkinfo" broadLogId={value.@id} deliveryId={value.@id1} mirrorurl={mirrorPageURL}/>;*/

    queryXML.@broadLogId = value.@id;
    queryXML.@deliveryid = value.@id1;
    queryXML.@mirrorurl = mirrorPageURL;
    } catch(e) {



I am able to fetch the mirror link but I am not able to insert it in the table. I am getting the below error:





Can anyone please help me as to how can I achieve this objective and get rid of this error?


Thanks in Advance,


3 Replies
Level 3
Level 3

Hi @rahuladwani,


You need to uncomment the second statement, and comment the first one here. You also need to add a key field to the statement, only then an insert will be successful.


/*var queryXML = <campmirrorlinkinfo _operation="insert" xtkschema="ybl:campmirrorlinkinfo"/>; */

var queryXML = <campmirrorlinkinfo _operation="insert" xtkschema="ybl:campmirrorlinkinfo" key="@broadLogId" broadLogId={value.@id} deliveryId={value.@id1} mirrorurl={mirrorPageURL}/>;

// I assume that broadLogId is the primary key of the schema you want to write to.





Hi @rahuladwani,

Were you able to resolve this query with the given solution or do you need more help? Do let us know.


Level 2
Level 2
Hello Ms Sukrity, I am still looking for the solution to this query.