2

Using PowerShell and CSOM, I'm able to upload to the Drop Off Library but the document never routes. Working with SP2016 on-prem.

  • Manually uploaded documents route correctly.
  • CSOM uploaded documents will route only after I edit the properties and click save (no changes are made to the metadata).
  • My account is in the Records Center Web Service Submitters group along with Site Owners.

Example of the script I'm working with:

        $FileStream = New-Object IO.FileStream($File.FullName,[System.IO.FileMode]::Open)
        $FileCreationInfo = New-Object Microsoft.SharePoint.Client.FileCreationInformation
        $FileCreationInfo.Overwrite = $true
        $FileCreationInfo.ContentStream = $FileStream
        $FileCreationInfo.URL = $File
        $Upload = $List.RootFolder.Files.Add($FileCreationInfo)

        $item = $Upload.ListItemAllFields
        $item["Router"] = "B" 
        $item.Update()
        $RemoteContext.Load($Upload)
        $RemoteContext.Load($item)
        $RemoteContext.ExecuteQuery() 
9
  • 1
    Shot in the dark - is it going in as “checked out”?
    – mannaggia
    Commented Apr 22, 2018 at 22:12
  • Require checkout is disabled. Commented Apr 23, 2018 at 1:22
  • Yes but I’ve had files go in as checked out even when it is not required, especially if there is a required column.
    – mannaggia
    Commented Apr 23, 2018 at 3:38
  • Previously tried that with no luck. Error: "The file "DropOffLibrary/testUpload_0.txt" is not checked out." Commented Apr 23, 2018 at 15:48
  • 2
    Any mandatory fields missing? I know you said you changed nothing but checking anyway... Commented May 2, 2018 at 10:23

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.