You are viewing limited content. For full access, please sign in.

Question

Question

Reading File type (extension) from entry properties using SDK LFSO

SDK
asked on July 1, 2014

how can i know entry extension using SDK LFSO ? where i can pass entry id a long with function in sdk to retrieve entry extension

 

 

see the attached snapshot

 

snapshot.png
snapshot.png (15.2 KB)
0 0

Answer

APPROVED ANSWER SELECTED ANSWER
replied on July 1, 2014

Something like this should work

    Private Function EFileExtension(ByVal iDocID As Integer) As String
        Dim sReturn As String = Nothing
        Try
            Dim doc As LFDocument = LFDB.GetEntryByID(iDocID)
            Dim edoc As LFElectFile = doc.ElectFile
            If Not edoc.IsEmpty Then
                sReturn = edoc.Extension
            End If
            doc.Dispose()
        Catch ex As Exception
            sReturn = Nothing
            'Log error here
        End Try
        Return sReturn
    End Function

 

1 0

Replies

replied on July 2, 2014

thanks a lot i used this and it works fine.

 

appreciated

 

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.