Hi,
I am trying to retrieve my current campaign name using instance.opertaion.Internalname. But it returns blank. can you please suggest which Js function will be working for retrieving campaign internal name. Apart from Sql query function. Appreciate your prompt response.
Thanks,
Gokul
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @GOKUL35 ,
You can use the below JS in the campaign Workflow to retrieve the Campaign Internal Name
var query = xtk.queryDef.create(<queryDef schema="nms:operation" operation="select"><select><node expr="@id"/><node expr="@internalName"/></select><where><condition expr={"@id = '"+instance.operation_id+"'"}/></where></queryDef>); var eventExistss = query.ExecuteQuery(); for each (var eventT in eventExistss.operation){instance.vars.CampaignInternalName = eventT.@internalName;}
logInfo("Campaign Internal Name: "+instance.vars.CampaignInternalName);
Hi @GOKUL35 ,
You can use the below JS in the campaign Workflow to retrieve the Campaign Internal Name
var query = xtk.queryDef.create(<queryDef schema="nms:operation" operation="select"><select><node expr="@id"/><node expr="@internalName"/></select><where><condition expr={"@id = '"+instance.operation_id+"'"}/></where></queryDef>); var eventExistss = query.ExecuteQuery(); for each (var eventT in eventExistss.operation){instance.vars.CampaignInternalName = eventT.@internalName;}
logInfo("Campaign Internal Name: "+instance.vars.CampaignInternalName);