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
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