PdcSharepoint.SearchFileInDirectory: Difference between revisions
Jump to navigation
Jump to search
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..." |
No edit summary |
||
Line 3: | Line 3: | ||
== Description == | == 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 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 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. | * 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. <br> | If successful, the result will contain a [[SharepointFileInfo]] from which the file can be accessed. <br> |
Revision as of 12:12, 22 July 2024
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