Developer technologies | VB
An object-oriented programming language developed by Microsoft that can be used in .NET.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi, I'm trying to display the System.CreatedBy fields below is my code: I tried to print in the debug mode but I couldn't get it. I have got all items in a List - Just want to get the Displayname of the user.
Dim IdRef As New IdentityRef
IdRef.Displayname = workitem(0).Fields.Values("System.CreatedBy")
An object-oriented programming language developed by Microsoft that can be used in .NET.
Figured it out - below is the code which is working for me. Hope this benefits
/*workitems is a list of workitems */
For each wfield in workitems
Dim IdRef As New IdentityRef
IdRef = workitem(0).Fields("System.CreatedBy")
idref.DisplayName = nameonly /*' displays only the name of the user */
idref.Uniquename = emailoftheuser /*' displays the email of the user. */
/*'Similarly to get the System.AssignedTo field - I used the following: */
Dim IdAssigned to as new IdentityRef
If wfield.Fields.ContainsKey("System.AssignedTo") Then
IdAssignedTo = wfld.Fields("System.AssignedTo")
LstWIT.Items(lstitem).SubItems.Add(IdAssignedTo.DisplayName & "/ " & IdAssignedTo.UniqueName)
Next wfield