AnsweredAssumed Answered

Use of GetLoggedInWindowsUserID

Question asked by Tom Thompson on Jun 8, 2012
Latest reply on Jan 23, 2013 by Hristo Daskalov

I'm trying to capture the Rename File event in EPDM 2010 and then getting the UserID of the person doing the rename.  I'm using this VB.Net code:

 

    Public Sub OnCmd(ByRef poCmd As EdmCmd, ByRef ppoData As System.Array) Implements IEdmAddIn5.OnCmd

 

        If poCmd.meCmdType = EdmCmdType.EdmCmd_PreRename Then

 

            Dim vault As IEdmVault11 = poCmd.mpoVault

 

            For Each cmdDatum As EdmCmdData In ppoData

                ‘...

                Dim id As Integer = vault.GetLoggedInWindowsUserID(vault.Name)

                ‘...

 

But the code bombs because of the call to GetLoggedInWindowsUserID.  (If I comment this line out, it runs fine.)  The error I get is:

 

EPDMError.jpg

 

We are not using Windows to manage our logins, we are using Enterprise PDM logins.

 

Am I calling this wrong?  Any other ideas?  Thanks!

Outcomes