Microsoft

Blog Categories

Subscribe to RSS feed

Archives

Required properties when using Official File web service

The Official File web service in SharePoint is used to submit files to a record repository. When the file gets submitted the metadata of the document is parsed and matched to a routing rule in the record center. One of the parameters passed to the SubmitFile method is metadata (properties) of the document.

 

publicstatic OfficialFileResult SubmitFile(
SPWeb web,
byte[] fileToSubmit,
RecordsRepositoryProperty[] properties,
string strRecordSeries,
string strSourceUrl,
string strUserName,
bool fViaSMTP,
outstring strResultInfo
)

 

The functionality I was implementing picked documents from a document library and submitted it to the record center through the Official File web service. The result status code of a SubmitFile operation kept returning a “More Information” status code due to missing properties.

Analyzing the issue I found that the metadata of the document got from the document library contained default properties added by SharePoint. The record repository looked for two specific properties. They are the ContentType and FileRefLeaf. The Content Type specifies the document type and is used to match the content type of the routing rule at the record repository. The FileRefLeaf contains the name of the file. If these two default properties are not contained as part of the Record repository properties passed to the SubmitFile method a status code of “More Information” with a missing properties message will be returned.

Tags:

Leave a Reply