Quantcast
Channel: jQuery Library for SharePoint Web Services
Viewing all articles
Browse latest Browse all 6517

New Post: Deleting documents

$
0
0
Hi,

Found a frustrating issue when deleting documents today - it seems that the BatchCMD xml really doesnt like the escaped '%20' space. Also found the solution - sharing so that this might help others.

Tried to follow the steps in this link - which correctly say that you need to pass the ID and the fileRef to the Batch cmd:

http://joshmccarty.com/2012/02/deleting-documents-with-spservices/

However, we hit a problem when the fileRef contains '%20' - since the library and filename contained a space.

If the ID and fileRef are themselves read from a 'getListItems' and the document library or fileRef contains a space '%20' - then the delete throws a 'do not have permissions' error.

A simple function is needed to parse the fileRef and replace '%20' with a space before passing the batchCMD xml.

Mike

Viewing all articles
Browse latest Browse all 6517

Trending Articles



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