2

My problem is very similar to this one (in what I'm calling) but I'm receiving a different error.

The XML I feed the service and the response is as follows;

<Batch OnError="Continue" PreCalc="True" ListVersion="3">
    <Method ID="1" Cmd="Update">
        <Field Name="ID" />
        <Field Name="FileRef">https://troom.corp.com/sites/subsite/Document Repository/John Doe Co/123456/Readme.md</Field>
        <Field Name="Account">John Doe Co</Field>
        <Field Name="UID">123456</Field>
    </Method>
</Batch>

<Results xmlns="http://schemas.microsoft.com/sharepoint/soap/">
    <Result ID="1,Update">
        <ErrorCode>0x81020030</ErrorCode>
        <ErrorText>The URL 'Document Repository/John Doe Co/123456/Readme.md' is invalid.  It may refer to a nonexistent file or folder, or refer to a valid file or folder that is not in the current Web.</ErrorText>
    </Result>
</Results>

I am hitting _lists.UpdateListItems(listGUID, updates); after uploading the file by a PUT request. I've tried playing with the FileRef, from which I've found out only the full URL is accepted. I'd be grateful if anyone can spot something I can't.

  • Most of my updates have been against lists and not libraries so I'm not 100% sure, but I thought you had to specify the ID and that it can't be an empty node like you have it. – Eric Alexander May 6 '14 at 16:17
  • I had read this a few places, but I heard you can also reference by FileRef (maybe this should be indexed) and seeing the other question I linked to reassured this. I'll double check if I can switch the ID in to test it now but I'd prefer not as it'd mean doing an extra call after my file PUT. Cheers for the quick pointer. – Malkin May 6 '14 at 16:20
  • The documentation shows that ID is used, msdn.microsoft.com/en-us/library/… – Eric Alexander May 6 '14 at 16:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.