Share via


ICustomRouter.OnSubmitFile method

Allows users to process and/or save documents that are sent or uploaded to a site where there content organizer is enabled.

Namespace:  Microsoft.Office.RecordsManagement.RecordsRepository
Assembly:  Microsoft.Office.Policy (in Microsoft.Office.Policy.dll)

Syntax

'Declaration
Function OnSubmitFile ( _
    contentOrganizerWeb As EcmDocumentRoutingWeb, _
    recordSeries As String, _
    userName As String, _
    fileContent As Stream, _
    properties As RecordsRepositoryProperty(), _
    finalFolder As SPFolder, _
    ByRef resultDetails As String _
) As CustomRouterResult
'Usage
Dim instance As ICustomRouter
Dim contentOrganizerWeb As EcmDocumentRoutingWeb
Dim recordSeries As String
Dim userName As String
Dim fileContent As Stream
Dim properties As RecordsRepositoryProperty()
Dim finalFolder As SPFolder
Dim resultDetails As String
Dim returnValue As CustomRouterResult

returnValue = instance.OnSubmitFile(contentOrganizerWeb, _
    recordSeries, userName, fileContent, _
    properties, finalFolder, resultDetails)
CustomRouterResult OnSubmitFile(
    EcmDocumentRoutingWeb contentOrganizerWeb,
    string recordSeries,
    string userName,
    Stream fileContent,
    RecordsRepositoryProperty[] properties,
    SPFolder finalFolder,
    ref string resultDetails
)

Parameters

  • userName
    Type: System.String

    Login name of the user creating the file.

  • fileContent
    Type: System.IO.Stream

    Content stream of the file being organized.

  • properties
    Type: []

    Metadata of the file being organized.

  • resultDetails
    Type: System.String

    Custom information that should be logged by the content organizer.

Return value

Type: Microsoft.Office.RecordsManagement.RecordsRepository.CustomRouterResult
Returns CustomRouterResult.

Remarks

This method is invoked when documents in the drop-off library are being organized. Before calling the custom router, the content organizer calculates the final location configured for the document by the rule manager. The custom router can either allow the content organizer to continue to save the document content to the predetermined location, or save the document if the contents or the final location of the file need to be modified.The EcmDocumentRouter class provides an API to save the document to the site depending on the versioning settings configured for the content organizer. To prevent unexpected failures, the custom router must not close the content stream that is being passed in.

Documents that are submitted from an external connection will be saved to the drop-off library so that the custom call out can be run for the document. When documents are submitted from an external connection, the properties of the source document are also saved to the Original Properties (Field Guid = "{126CD502-6801-4ae4-9F56-BFC3488C4743}") column in the drop-off library.

See also

Reference

ICustomRouter interface

ICustomRouter members

Microsoft.Office.RecordsManagement.RecordsRepository namespace

EcmDocumentRoutingWeb

EcmDocumentRouter

GetHashtableForRecordsRepositoryProperties([], String)

SaveFileToFinalLocation(EcmDocumentRoutingWeb, SPFolder, Stream, String, String, Hashtable, SPUser, Boolean, String)