Subject:Push notification it is not redirecting

Abhilasha G T
Tera Contributor

Description:

when we click on mobile push notification it is not redirecting to record, it is loading. 

2 REPLIES 2

Amit Gujarathi
Giga Sage
Giga Sage

HI @Abhilasha G T ,
I trust you are doing great.
Here's an example of a basic script structure for a push notification. Note that this is just a template and should be tailored to your specific record and requirement:

(function() {
    var message = "Your custom message here";
    var recordLink = "tablename.do?sys_id=" + current.sys_id;

    // Add your logic here to define 'users' who will receive the notification
    var users = [/* array of user sys_ids */];

    // Sending notification
    users.forEach(function(userSysId) {
        snNotifier.send(userSysId, message, recordLink);
    });
})();

Was this answer helpful?


Please consider marking it correct or helpful.


Your feedback helps us improve!


Thank you!


Regards,


Amit Gujrathi



Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Abhilasha G T 

 

Greetings!!

 

Few good links:

 

https://www.servicenow.com/community/mobile-apps-platform-forum/push-notification-redirect-link/m-p/...

 

https://www.servicenow.com/community/training-and-certifications/link-in-the-notification-is-not-red...

 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************