Hi All,
I need some help, if someone has done it please share thoughts or send me in right direction.
I have more than 100 Email Delivery templates for different brands and I have to make couple of change in the properties of these templates. Changes includes updating 'Execution Folder', 'Routing', 'Web Analytics Account' and 'Typology'. These properties already have value but I need them to update with new ones.
I have highlighted the updates I need to made in below example image:
can we achieve this through workflow or any other way?
Appreciate your help, Thanks!!
Solved! Go to Solution.
Views
Replies
Total Likes
The javascript option @_Manoj_Kumar_ will work.
If you wanted a non scripting way to do you can navigate to your templates folder then filter for all the correct templates. Once you have the correct templates select them all.
Then right click -> Actions -> Mass Update of Selected Lines
then the dialogue will allow you to enter what field and values should be populated.
This will update all the templates you've selected with the fields and values you specified.
Views
Replies
Total Likes
Hello @parmeshwarr3905
You will have to write a javascript code to pull the deliveries and then update the ids. First get the primary keys of your routing, web analytics account, and execution folder and use this script to modify your details and use case.
var q = xtk.queryDef.create( <queryDef schema="nms:delivery" operation="select" > <select> <node expr="@id" alias="@id"/> </select> </queryDef> ); var deliveries = q.ExecuteQuery(); for each(var d in deliveries){ var delivery=nms.delivery.load(d.@id); delivery.deliveryProvider-id=123; // Routing primary key delivery.typology-id=123; // Typolofy primary key delivery.folderProcess-id=222; // execution primary key delivery.webAnalyticsAccount-id=123; //web analytics account primary key delivery.save(); }
Note: This script is an example only. You will have to change a few things according to your requirement.
I have modified query by adding where condition to test it but it's throwing an error. Please let me know how can I update the script to resolve this
Views
Replies
Total Likes
try taking the comments completely out
remove these
// Routing primary key
Views
Replies
Total Likes
@David_Loyd Yes I tried that. But no luck. I though it needed '==' to assign new id in that case it says 'id' not defined.
Views
Replies
Total Likes
The javascript option @_Manoj_Kumar_ will work.
If you wanted a non scripting way to do you can navigate to your templates folder then filter for all the correct templates. Once you have the correct templates select them all.
Then right click -> Actions -> Mass Update of Selected Lines
then the dialogue will allow you to enter what field and values should be populated.
This will update all the templates you've selected with the fields and values you specified.
Views
Replies
Total Likes