Including Links to Incidents or Activities in Notification Templates (SCSM 2012)

Including Links to Incidents or Activities in Notification Templates (SCSM 2012)

  • Comments 24
  • Likes

UPDATE: Feb 14 2012 – Please read

Given some additional testing we have verified that there is an issue here.  The code that applies a notification template will place curly braces (i.e. { and } ) around the GUID in the notification that is sent out.  When those curly braces are handled by a browser they are escaped in the URL query string with %7b ( { ) and %7d ( } ).  The Silverlight web part which displays the activities or service requests/incidents doesn’t know how to handle the additional text in the strings when it tries to look up an object by GUID.

We will probably address this by changing the code which applies the notification template so that it strips the curly braces off.

As the RTM code base is in lock down right now there is no way to fix this until the 1st cumulative update.  I’ll target this fix for that release and see if I can get it through.

I’ll leave this blog post up here for now and update it again when the fix is available in a cumulative update or hotfix.

=====================================================

This blog post was written by Andreas Baumgarten (blog in German), one of our super community contributors.  Thanks Andreas!

=====================================================

Including Links to Incidents or Activities in Notification Templates

The Self-Service Portal of SCSM 2012 offers the following options:

· Follow the requests for an affected user (incidents, service requests) -> My requests

· Work with review and manual activities by reviewer and activity implementer -> My activities

It’s a common request to send the URL of the related object by mail via notification workflow.

Here is a short guide how this can be done.

First of all, the link must contain the GUID of the related object:

clip_image002

The GUID is attached at the end of the URL.

For SCSM 2012 Incidents:

https://<server>:<port>/SMPortal/SitePages/My%20Requests.aspx?RequestId=<GUID>

For SCSM 2012 Activities:

https://<server>:<port>/SMPortal/SitePages/My%20Activities.aspx?ActivityId=<GUID>

 

Now the GUID is needed as a variable in the notification template.

Open a notification template to add the Link to the SCSM 2012 Self Service Portal.

For this solution, it is required to enable “Send as HTML “in the notification template!

The following line in the notification template will add the link of an incident object:

<a href=”https://<servername>:<port>/SMPortal/SitePages/My%20Requests.aspx?RequestId=$Context/?$Id$?“>Click here</a>

To send a link of an activity the following line can be used in a notification template:

<a href=”https://<servername>:<port>/SMPortal/SitePages/My%20Activities.aspx?ActivityId=$Context/?$Id$? “>Click here</a>

Note: if you have changed your SharePoint site name from ‘SMPortal’ to something else you will need to put your site name in the URL here instead of SMPortal.

 image

Here is the result.

The incident:

clip_image006

The mail:

clip_image008

The SCSM 2012 self-service portal after clicking the link in the mail:

image

A special thanks to Travis Wright for helping with this tweak!

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
  • When I use this it puts %7b in front of the GUID and %7d after it and I assume that is because IE doesn't know how to handel the brackets { and } that are part of the GUID.  How do you solve this issue?

  • Refering to my original post, this is how the URL should look:

    http://<server>:<port>/SMPortal/SitePages/My%20Requests.aspx?RequestId=17f55092-b5b7-230a-be57-bbbb522408fe

    But when I get the email the URL has %7d and %7b like this:

    http://<server>:<port>/SMportal/SitePages/My%20Requests.aspx?ActivityID=%7b17f55092-b5b7-230a-be57-bbbb522408fe%7d

  • Which version of IE are you running? I tested it with IE 8.0 and 9.0. Also Chrome can handle the %7b and %7d instead of the { and }.

  • I am also having issues with the %7b and %7d

    http://<server>:<port>/SMportal/SitePages/My%20Activities.aspx?ActivityID=%7b17f55092-b5b7-230a-be57-bbbb522408fe%7d

    I have tried with IE 8.0 and IE 9.0

  • Just to be sure: The Link/URL is only working properly if the affected user of the request is using the link. The link won't work if the affected user is "Mr/Mrs X" and another user wants to use the link.

    What is the exact issue with the %7b/%7d in IE ? Nothing is shown? Any error messages? Wrong request is shown?

  • I am using IE 9 and when the %7b and %7d are in the link it just takes me to the first item in the My Requests list, it doesn't go to the specific incident or service request that it is for.  As soon as I take the %7b and %7d out of the link it takes me to the correct incident or service request.

    Also, I am the affected user on the incidents and service request I am testing this with.

  • I have now tested in 3 browsers, IE 9, Chrome (17.0.963.46), and Firefox 10.0.1.  None of them take me to the correct incident or service request when the %7b/%7d are in the URL. Chrome and Firefox do recognize the brackets { } and FireFox even converts the %7b/%7d back to brackets but they still don't go to the correct incident or request until the brackets or %7b/%7b is removed from the URL.

  • When I select the link it takes me to the first item in My Actives. If I remove the %7b and %7d out of the url I am directed to the corect Review activity.

    There are no error messages

    I am the affcted user and the reviewer, I also have another person as a reviewer and the link is doing the same for them.

  • The variables work, but I receive an email link is not correct, change https:// to http://

    Are there differences between making an html hyperlink http and https?

    I enter the following code in the template: <a href="https://servicemanager:444/SMPortal/SitePages/My%20Requests.aspx?RequestId=$Context/?$Id$?“">Click here</a><o:p></o:p></span></p>

    How do you solve this issue?

  • I am getting this extra stuff when i click the link in the mail xn--http-fb7a

    Please help me with this

  • Has anyone found a suitable workaround for this yet in SrvMgr 2012?

  • This is fixed in the next cumulative update that will be released pretty soon.

  • Does anyone know when CU1 is supposed to come out?

  • SC 2012 CU1 already came out but it didn't have any updates for SM.

  • This issue should be fixed in the "Update Rollup 2 for Service Manager 2012" (released today):

    www.microsoft.com/.../details.aspx