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:
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
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:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.