Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

Record Center Custom Router EcmDocumentRouter.SaveFileToFinalLocation method does not store document

$
0
0

Hello,

I have created a custom router which stores documents into SharePoint document library locations based on metadata values.

I find that it stores the first document to a location but does not store a second document that has the same (deciding) metadata values. Other metadata value do vary, just not the ones that determine the final location.

I checked and all the values look correct - the file name is obviously different. SaveFileToFinalLocation returns null.

Any suggestions are appreciated.

                // User creating the file
                SPUser submittingUser = web.SiteUsers[userName];

                string fileName = fileProperties["Name"].ToString();

                SPFile file = EcmDocumentRouter.SaveFileToFinalLocation(
                    contentOrganizerWeb,
                    finalFolder,
                    fileContent,
                    fileName,
                    "",
                    fileProperties,
                    submittingUser,
                    true /*override versioning settings on the content organizer and create a new file*/, "");


macrel


Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>