- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi,
I’m implementing mobile push notifications for incidents assigned to users in ServiceNow (Yokohama version). The notification is successfully received on the mobile device. However, when tapping the incident number within the push notification, it does not navigate to the specific incident record as expected.
Troubleshooting Steps Taken
Reviewed the JSON structure in the official product documentation and referenced a YouTube tutorial. Both indicated that the push message content JSON should include the relevant applet and record reference.
In my instance, when configuring the push message, I noticed that no applets are appearing in the navigator to select or reference within the message content, despite building/configuring push notifications and the necessary Mobile UI Builder setups.
Below is the javascript code:(function buildJSON(current, message, attributes) {var layoutGen = new global.NotificationLayoutFieldGenerator();var text_01 = layoutGen.layoutField(current.getTableName(), current.sys_id, "priority");var text_02 = layoutGen.layoutField(current.getTableName(), current.sys_id, "state");var text_03 = layoutGen.layoutField(current.getTableName(), current.sys_id, "short_description");var msg_title = "System updates!";var deepLinkGenerator = new global.MobileDeepLinkGenerator("Request");var link = deepLinkGenerator.getFormScreenLink("5120f7c7770101108f64b2487b5a9904", current.getTableName(), current.getValue("sys_id"));var json = {"android_title": msg_title,"aps": {"alert": {"title": msg_title}},"Link": link,"Layout": {"Status": text_01,"Identifier": text_02,"Description": text_03}};return json;})(current, message, attributes);
Anyone knows this ?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
Hi @PrakshalJain
you need to pass the record screen (like below screen sys_
id ) sys_id at first param of this method var link = deepLinkGenerator.getFormScreenLink("5120f7c7770101108f64b2487b5a9904", current.getTableName(), current.getValue("sys_id"));
then after it would redirect to particular record screen after tap on the push notification in mobile
make sure record screen should be correct like if your push notification for the incident then record screen also for the incident table not for others
If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Thank You!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
Hi @PrakshalJain
you need to pass the record screen (like below screen sys_
id ) sys_id at first param of this method var link = deepLinkGenerator.getFormScreenLink("5120f7c7770101108f64b2487b5a9904", current.getTableName(), current.getValue("sys_id"));
then after it would redirect to particular record screen after tap on the push notification in mobile
make sure record screen should be correct like if your push notification for the incident then record screen also for the incident table not for others
If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Thank You!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
Hi @Sanjay191
I have tried creating a record screen for incident and also tried with pre-existing record screens sys id still its landing on to dashboard home screen on both the screen's sys id
tried in both personal instance as well as in my clients instance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago - last edited 2 weeks ago
Hi @PrakshalJain
Did you correctly configure your push notification for the mobile ?
Make sure you scope of the record screen and push notification will in same scope.
can you please try to create all the configuration in one scope (global).
please refer this as well
https://www.youtube.com/watch?v=mbOubsyQFrw
If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Thank You!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
Hi @Sanjay191
The above has been resolved
I have to modify the data item script which I was attaching in record screen as per my requirement also the scope of data item has to be in catalog mobile scope irrespective of the record screen scope
but thanks for your guidance.