How to toggle off the Primary Email on Notification Preference

Akshay Jadhav1
Tera Contributor

Hello All,

 

We have a requirement for the Notification Preference appearing on the CSM Portal. Once the "XYZ" Notification is received on the Portal for the particular user, then the "Primary Email" toggle button for the "XYZ" Notification should automatically turn off. The User would then decide whether to Turn ON/OFF the Primary Email.

 

Currently, when the Notification is triggered and visible on the Portal, the "Primary Email" toggle button automatically turns ON.

 

Please find the attached screenshot for your reference.

 

Thank you in Advance for your help !!

 

@Ankur Bawiskar Any thoughts on above scenario ?

1 ACCEPTED SOLUTION

Shraddha Kadam
Mega Sage

Hello @Akshay Jadhav1,

 

Please create an After Insert Business rule on "cmn_notif_message" table and use below source code :

current.notification_filter =  <sys_id of the notification filter>
current.update();

 

Also, create one Before Update business rule and add the condition as "Updates greater than 1". Also in the advance use below source code :

if (current.sys_mod_count > 1 && previous.notification_filter == '') {
        current.notification_filter == <sys_id of the notification>;
        current.update();
    }

 if (current.sys_mod_count > 1 && previous.notification_filter == <sys_id of the notification filter>) {
        current.notification_filter == '';
        current.update();
 }

 

If my answer is useful then please mark it as helpful and accept the solution.

 

Thank you.

 

If my response was helpful, please mark it as correct and helpful.
Thank you.

View solution in original post

1 REPLY 1

Shraddha Kadam
Mega Sage

Hello @Akshay Jadhav1,

 

Please create an After Insert Business rule on "cmn_notif_message" table and use below source code :

current.notification_filter =  <sys_id of the notification filter>
current.update();

 

Also, create one Before Update business rule and add the condition as "Updates greater than 1". Also in the advance use below source code :

if (current.sys_mod_count > 1 && previous.notification_filter == '') {
        current.notification_filter == <sys_id of the notification>;
        current.update();
    }

 if (current.sys_mod_count > 1 && previous.notification_filter == <sys_id of the notification filter>) {
        current.notification_filter == '';
        current.update();
 }

 

If my answer is useful then please mark it as helpful and accept the solution.

 

Thank you.

 

If my response was helpful, please mark it as correct and helpful.
Thank you.