Using SMLets Beta 3 Post #12–Getting a GUID ID of an Object (Especially for Work Items)
Published Feb 15 2019 09:31 AM 194 Views
First published on TECHNET on Jan 05, 2012

Here’s a tricky one.  How do you get the GUID ID of a work item using SMLets?

First let’s start with getting the GUID ID of a Windows computer object.

We could do something like this:

Sweet.  Easy.

What if we did the same thing with a work item?

Wait a minute!  That’s not what we expected!

This is happening because the System.WorkItem class from which all other work item classes (Incident, Change request, Problem, Activity, etc) derive from has a property named ID!

So – in this case we need to be a little more clever to get the GUID ID.  This is one way to do it using the Get_ID() method.

Another example of how to use this:

And of course this works for any kind of object in the system like Windows computers for example:

Version history
Last update:
‎Mar 11 2019 08:57 AM
Updated by: