How to use sysparm_view in the notification to get our desired view of the form?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2015 12:12 AM
Hi,
In our scenario there is a link that opens the task form in the notification email. Whenever we click the link the default view of the task form is being opened. Our requirement is "the form should appear in our desired view". For that we have created a view on the task table.
We have tried many ways to get the desired view using URI , URI_REF, URL
We have selected the 'Content Type' in the notification as "HTML and plain Text" and have added the below line (which is mentioned in WIKI) in the Message
Click here to view the task: ${URI+sysparm_view=BA_Termination_Task}
The hyperlink appears in the mail as
we have also tried with
Click here to view the task: ${URI+&sysparm_view=BA_Termination_Task}
This appears as
Nothing worked. Can anyone suggest any solution to this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2015 03:28 AM
Try using this method to generate the link and add the view parameter as per your need
http://wiki.servicenow.com/index.php?title=GlideRecord#getLink&gsc.tab=0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2015 01:20 PM
Hi Pallavi,
Were you able to find a solution to this? I also see the same behavior in my enviroment.
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2015 09:37 PM
Hi Miguel,
We are still not able to find a solution for this as we are trying to add the view with out using mail scripts. The methods pradeep and kalaiarasan suggested are to be done with mail scripts. We are still searching for resolution of the issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2015 10:31 AM
Hello Pallavi,
ServiceNow has created problem PRB646045 for this issue.
Thank you,
Miguel Calderon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2015 08:49 PM
Hi Miguel,
Create a new email notification script and use the below 2 lines in that. What I am doing here is setting the General view for the incident, when the user clicks the link in the email he receives.
var url = gs.getProperty("glide.servlet.uri") + 'nav_to.do?uri=incident.do?sys_id='+current.sys_id+'%26sysparm_view=general'; //Here the General view is used
template.print('<a href="' + url + '">' + current.number.getDisplayValue() + '</a>');
Give the script a name and then go to the notification and include ${mail_script:name of the notification script} in the place where you want to use.
This will definitely work as I use this in my instance. let me know for any issues.