Mass Updating Delivery Parameters
Hi Team,
I am writing a script to mass update parameters such as Sender Address and Reply Address from the Deliveries schema. Additionally, I need to update the Routing (External Account) of Delivery Templates, but I'm unable to do so as the value does not get updated when using the Routing Primary Key.
Moreover, I want to exclude OOTB Delivery Templates to ensure they are not modified or updated.
Below is the script I am using:
var delivery = NLWS.xtkQueryDef.create
(
{queryDef: {schema: vars.targetSchema , operation: 'select',
select:
{
node: [
{expr: '@id'},
{expr: '@from'},
{expr: '@reply'},
{expr: '@extAcct'},
]
}
}});
var results = delivery.ExecuteQuery();
for each (var res in results.getElements("query"))
{
delivery = NLWS.nmsDelivery.load(res.getAttribute('id'));
delivery.mailParameters.senderAddress= res.getAttribute('from');
delivery.mailParameters.replyAddress= res.getAttribute('reply');
delivery.deliveryProvider.id= res.getAttribute('extAcct');
delivery.save();
}
I need help with the following:
Updating the Routing (External Account) in Delivery Templates – The value is not getting updated.
Excluding OOTB Delivery Templates – How can I filter them out to avoid unintended modifications?
Any guidance on these points would be greatly appreciated.
Thanks,
Ankita Vishe