Accessing information on a WorkItem of a linked WorkItem
Hi everyone, I have a custom WorkItem that has 2 links to other custom WorkItems. I want to create an extension that automatically copies the HTMLSummary from the second linked WorkItem to the saved WorkItem.
I read through this: https://rsjazz.wordpress.com/2012/09/19/the-rtc-workitem-link-api-linking-workitems-to-other-elements/
to get to my linked workitem, but I can't seem to get any information out of it.
I'm currently stuck at this:
if(resolvedRef instanceof IWorkItemHandle){ IWorkItemHandle handle = (IWorkItemHandle)resolvedRef; }How do I check if this IWorkItemHandle is my second link?
How do I access it's fields/HTMLSummary?
Thanks
Comments
sam detweiler
Aug 09 '16, 8:46 a.m.the design of the system uses a small representation of the objects as the persistent data. its a 'handle' to the real object. the handle does NOT contain any useful data.
this reduces memory consumption for what is expected to be large numbers of objects.
you must ask the system to populate (resolve) the object with the data elements you need.
the resolve 'profiles' (small, medium, large, default) select the data elements you need. (you can create your own profile on the fly to get only specific data elements)
As an example, in one of my applications, I only need the email address of the user (IContributor), so that is all I ask the system to get me.. no point retrieving the other data if its not going to be used.
Philipp H
Aug 09 '16, 8:02 a.m.Ok, thanks for explaining!