Skip to main content
Nintex Community Menu Bar

Full Name instead of LoginID

  • March 16, 2006
  • 3 replies
  • 12 views

Forum|alt.badge.img+1
Hi

First of all let me thank NielM for answering all the questions I posted previously.

One more questions to begin with.

1. How to get full user name instead of loginid.
I have a server activity which sends e-mail to web administrators, in the body of the email I want "Dear Raj Bulsara" instead of "Dear BulsaraR", Where "Raj Bulsara" is full name and "BulsaraR" is the login id.

I tried using following code but each one has different result instead of what I want.

K2.ActivityInstanceDestination.User.Name returns BulsaraR
K2.ActivityInstanceDestination.User.Description returns ""
K2.ActivityInstanceDestination.User.FQN returns mofBulsaraR

Any help is highly appreciated.

Cheers

Raj

3 replies

Forum|alt.badge.img+11
  • Nintex Employee
  • March 16, 2006
Hi,

I do not know of any K2.net method, object, class or property that will return the actual name from AD - unless you store the Full Name in the Description Field. You'll have to use the .Net DirectoryServices class to return the fullname.

Regards,
Ockert

Forum|alt.badge.img+13
  • Rookie
  • March 7, 2007
Public Function GetUserFullName(ByVal sUserID As String) As String
'Return full name based on Windows ID
Dim oDSH As New SourceCode.K2Utilities.DSHelper()
Try
Dim arStrUser As String()

arStrUser = sUserID.Split("")
If arStrUser.Length > 1 Then
sUserID = arStrUser(1)
End If
Return oDSH.GetUser(sUserID).Properties("displayName")(0).ToString
Catch ex As exception
Return "Unknown User"
End Try
End Function

Forum|alt.badge.img+1
  • Author
  • March 7, 2007
Hi Peter

Thanks for your solution. I haven't tried it.

I received an e-mail just today i.e 7/3/2007 that somebody has responded to my query.

However I did manage to fix this issue by floating a webservice.

Cheers and Thanks

Raj