How to add the proper link of a Service Request ID into a notification mail
I would like to send the link of the Parent Service Request ID within a notification for a Review activity, so the reviewer can open up the SR in the Portal. What's the correct class of this ID and how to add it to the template?
My link looks like:
<p>Link to Service Request: <a href="http://xxxx.yyyy.ch/ServiceRequest/Edit/?????????">http://xxxx.yyyy.ch/ServiceRequest</a></p>
I've tried the work ID of the "Has Parent Work Item" to replace the question marks as place holders but the link in the mail only contains "http://xxxx.yyyyy.ch/ServiceRequest/Edit/" without the ID of the parent SR. This of course causes an error on the Portal page when clicking the link.
I also cannot find the proper class items to add the affected user to the same template. I've tried the "Affected User" FirstName and LastName properties, but the field is empty.
"You have been assigned a Review Activity from . We need either your approval ...."
I'd be glad to get some help which class items to add to have a proper template which allows the reviewer to open the SR on the Portal and to have all required Information in the mail.
Thanks.
Ingrid
Best Answers
-
Candice_Yeudall Customer Advanced IT Monkey ✭✭✭
Hey Ingrid this can be a real pain. I will give you a few links and examples:
Here is the 1st Name from the SR of the affected user please note the use of the SeedRole='Target' that is what makes it work.
$Context/Path[Relationship='CustomSystem_WorkItem_Activity_Library!System.WorkItemContainsActivity' SeedRole='Target' TypeConstraint='CustomSystem_WorkItem_Library!System.WorkItem']/Path[Relationship='CustomSystem_WorkItem_Library!System.WorkItemAffectedUser' TypeConstraint='CustomSystem_Library!System.User']/Property[Type='CustomSystem_Library!System.User']/FirstName$
Will try to add more a bit later, have a meeting to go to ...5 -
Conner_Wood Customer Ninja IT Monkey ✭✭✭✭I showed how to correctly filter down the criteria to use the correct notification with activities
You should have enough knowledge (and links) now to make it happen.5
Answers
Hey Ingrid this can be a real pain. I will give you a few links and examples:
1) https://blogs.technet.microsoft.com/antoni/2014/05/23/include-details-from-parent-work-items-in-notifications/
2) https://blogs.technet.microsoft.com/servicemanager/2012/04/03/using-data-properties-from-the-parent-work-items-in-activity-email-templates/
3) https://social.technet.microsoft.com/Forums/en-US/b07c2e83-4769-4469-899e-4e5b1b936e3c/notification-for-activities?forum=systemcenterservicemanager
4) https://social.technet.microsoft.com/Forums/en-US/dc498dbe-5e02-4b23-8f2b-6dc32782a25c/notification-on-service-request-instead-of-activity?forum=administration
Here is the 1st Name from the SR of the affected user please note the use of the SeedRole='Target' that is what makes it work.
$Context/Path[Relationship='CustomSystem_WorkItem_Activity_Library!System.WorkItemContainsActivity' SeedRole='Target' TypeConstraint='CustomSystem_WorkItem_Library!System.WorkItem']/Path[Relationship='CustomSystem_WorkItem_Library!System.WorkItemAffectedUser' TypeConstraint='CustomSystem_Library!System.User']/Property[Type='CustomSystem_Library!System.User']/FirstName$Will try to add more a bit later, have a meeting to go to ...
You should have enough knowledge (and links) now to make it happen.
Hey Candice, hey Conner,
thanks for the links. I had found quite a lot of Information but nothing really helped me. One Thing was the necessity of SeedRole='Target? that wasn't obvious to me. The other one with affected user wasn't taken from the activity relationsship class, but the activity itself. And of course, there's no affected user. The ID of the SR is now polulated in the mail, I'm waiting for the next test with the affected user.
Ingrid