Using Data Properties From the Parent Work Items in Activity Email Templates

This Blog post has moved!


About gregwoj
Greetings! I am an SCSM/IT Consulting professional looking out for SCSM customers out there who may be stuck in the mud and need some insight to get them moving in the right direction!

16 Responses to Using Data Properties From the Parent Work Items in Activity Email Templates

  1. thechrisross says:

    Nice article!

  2. RobBOB says:

    This was awesome. I thank you and Travis for the work of figuring this stuff out. You guys are making our lives easier with this Microsoft product.

  3. Jay says:

    Should this work for service requests as well? I’m trying to get the parent service request work item ID into a review activity notification but I just get a string of random characters where it should be in the template. See for detail.

    • gregwoj says:

      Hi Jay:

      I havent tested this with Service Request Class. But it should work in theory. In terms of your “random string of characters” are you making sure you use the “insert parameter” button rather than cutting and pasting?


      • Jay says:

        Yes, this is what my token looks like: $Context/Path[Relationship=’CustomSystem_WorkItem_Activity_Library!System.WorkItemContainsActivity’ SeedRole=’Target’ TypeConstraint=’CustomSystem_WorkItem_Library!System.WorkItem’]/Property[Type=’CustomSystem_WorkItem_Library!System.WorkItem’]/Id$

      • gregwoj says:

        Go into your SR and then open up one of the activities within that SR. Review the history log of the MA or RA within your SR. Find the relationship that SCSM is using for the SR (Parent) and the MA/RA (CHild). Validate that the relationship is “Contains Activity”. Let me know what it says.

      • Jay says:

        Yep, the parent SR is appearing in the history of the RA as being added with a Contains Activity relationship.

      • gregwoj says:

        Jay, sorry for the delay on this. I cant get it to work with the SR Class either. Your best option at this point may be to open a case with msft and see how they can guide you. I will keey trying this in the mean time. – Greg

  4. Pingback: System Center: Service Manager Engineering Team Blog

  5. Rob says:

    Is there a way to also reference an incident in the manual activities e-mail when it is located in the related items field of the change request?

    • gregwoj says:


      This *Might* be possible. You would first need to look at the history section of the CR and determine which relationship type is changed. In my blog, the Parent CR info is listed as “Contains Activity”. Look at the history of your CR and lets start there. What is SCSM classifying the IR as? Contains Activity also?

      • Rob says:

        IIn relationship changes is shows:
        Add – Is related to work item – IR**** Title of incident.

        So I tried to use this and a manual activity e-mail template but no luck.

      • gregwoj says:

        Yeah like I said, that may not work or require some major ninja skills to make it work. Sorry I couldnt be of more help!

  6. Andrea says:

    This works great for me, except that I can need to pull the true container ID and not the actual Parent. For example, I get the PA or SA ID instead of the SR or CR ID. Any thoughts? Thanks.

    • gregwoj says:

      Check which relationship its tagging as the ID you want to grab in the “History” section of the CR/IR/SR etc. The history section will tell you what ID its grabbing as the relationship ID (e.g. “Contains Activity: CR123”). Then use the “SeedRole = ‘Target'” in your code in your HTML when choosing that relationship ID. There are TONS of relationship IDs you can choose when grabbing data properties for email notifications. You may need to play around with it in a test box until you get it right.

      • Andrea says:

        Thanks so much for getting back to me. Finding the relationship isn’t the problem. The issue is that we have a lot of SR templates that use parallel activities. So, when I try to pull the ID and description into the MA and RA emails, I’m pulling the PA ID, Title, and Description, not the top level SR information.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: