Function OnSubmitFile ( _ recordSeries As String, _ sourceUrl As String, _ userName As String, _ ByRef fileToSubmit As Byte(), _ ByRef properties As RecordsRepositoryProperty(), _ ByRef destination As SPList, _ ByRef resultDetails As String _ ) As RouterResult
Dim instance As IRouter Dim recordSeries As String Dim sourceUrl As String Dim userName As String Dim fileToSubmit As Byte() Dim properties As RecordsRepositoryProperty() Dim destination As SPList Dim resultDetails As String Dim returnValue As RouterResult returnValue = instance.OnSubmitFile(recordSeries, sourceUrl, userName, fileToSubmit, properties, destination, resultDetails)
RouterResult OnSubmitFile ( string recordSeries, string sourceUrl, string userName, ref byte[] fileToSubmit, ref RecordsRepositoryProperty[] properties, ref SPList destination, ref string resultDetails )
A string that represents the record routing type specified for the submitted document.
A string that represents the URL of the document being submitted.
A string that represents the user logon name of the document submitter.
The document being submitted.
A string that represents the document properties specified by the document submitter.
A string that represents the list in the record repository to which the document is to be submitted, based on the value specified for the recordSeries parameter.
A string that represents additional information from the router regarding its processing of the document.
SuccessContinueProcessing The router has successfully completed its processing, and the record repository continues with its processing of the document.
SuccessCancelFurtherProcessing The router has successfully completed its processing, but the record repository discontinues its processing of the document. The record repository returns a success value to the calling application, as well as the contents of the resultData parameter.
RejectFile The router did not complete its processing successfully. The record repository returns an error to the calling application, as well as the contents of the resultData parameter.
Each custom router must implement the IRouter interface. When a file is submitted to the records repository, Office SharePoint Server 2007 calls the appropriate custom router, if there is one, by using the OnSubmitFile method.
The fileToSubmit, properties, destination, and resultData parameters are passed by reference, so that the custom router can change these values as necessary. Therefore, the custom router has the ability to edit the submitted document and its associated metadata, change the storage destination of the document, and communicate details of its processing to the records repository.
A sample project, including source code is available here...
http://blog.thekid.me.uk/archive/2007/04/15/creating-a-custom-router-for-records-center-in-sharepoint.aspx