PdcSharepoint.SearchFileInDirectory

From External Bemet Wiki
Revision as of 11:56, 22 July 2024 by TC (talk | contribs) (Created page with "== Declaration == SearchFileInDirectory(intDirectoryType As Integer, intPID as Integer, strSubDirectory as String) As SharepointFileInfo == Description == The parameter intDirectoryType indicates a number which provides context regarding the entity. This number corresponds to an entity type, for example Companies or Calculations. See DirectoryTypes for more information. The parameter intPID is the unique _pid value that each record in the database has. This pid...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Declaration

SearchFileInDirectory(intDirectoryType As Integer, intPID as Integer, strSubDirectory as String) As SharepointFileInfo

Description

The parameter intDirectoryType indicates a number which provides context regarding the entity. This number corresponds to an entity type, for example Companies or Calculations. See DirectoryTypes for more information. The parameter intPID is the unique _pid value that each record in the database has. This pid is used to determine which folder needs to be searched for within Sharepoint. The parameter strSubDirectory is for any subdirectory within the main directory. For example if the directory structure is like this: 'Companies\00211 - AHREND [68]\invoices\October', you can fill in the strSubDirectory parameter with 'invoices\October' to search within the oktober subdirectory.

If successful, the result will contain a SharepointFileInfo from which the file can be accessed.
If unsuccessful, the result is nothing

Code example

Dim sp As PDCEXT.PdcSharepoint = PDC.App.Sharepoint("sharepointHoofdMap")
Dim sharepointFile As ISharepointFileInfo = sp.SearchFileInDirectory(12, 633, "", "invoices\October")
If Not IsNothing(sharepointFile ) Then
    MsgBox(spFileInfo.FileName)
End If

Availability

Available since 2024R4