Hi guys,
It is possible to insert a date (in a new field) once a recipient's field is updated, for instance, the blacklist field? So we can check when a user opted-in or opted-out?
Thank you!
Regards,
Raúl
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @RaulOcana ,
recipient table has a native link to Modified by where datetime is updated when any field is changed.
In case you need a new column you can define a new attribute/column like this and field will contain sysdate when record was inserted (Oracle).
If you are using web app (for email opt in/out) you can use JS like this:
if ( ctx.vars.recipientId == "" || ctx.vars.recipientId == undefined || ctx.vars.recipientId == null ) {
ctx.recipient.@xtkschema="nms:recipient";
ctx.recipient.@_operation="update";
ctx.recipient.@_key="@id";
ctx.recipient.@lastBlackListEmail = (new Date()).toISOString();
if ( ctx.currentBlackList.@blackListEmail != ctx.recipient.@blackListEmail ) {
xtk.session.Write(ctx.recipient)
}
}
Regards,
Milan
Hi @RaulOcana ,
recipient table has a native link to Modified by where datetime is updated when any field is changed.
In case you need a new column you can define a new attribute/column like this and field will contain sysdate when record was inserted (Oracle).
If you are using web app (for email opt in/out) you can use JS like this:
if ( ctx.vars.recipientId == "" || ctx.vars.recipientId == undefined || ctx.vars.recipientId == null ) {
ctx.recipient.@xtkschema="nms:recipient";
ctx.recipient.@_operation="update";
ctx.recipient.@_key="@id";
ctx.recipient.@lastBlackListEmail = (new Date()).toISOString();
if ( ctx.currentBlackList.@blackListEmail != ctx.recipient.@blackListEmail ) {
xtk.session.Write(ctx.recipient)
}
}
Regards,
Milan
Views
Replies
Total Likes
Views
Likes
Replies