SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

i am currently running some code on a sharepoint front end and am getting this error

"Cannot complete this action.\n\nPlease try again."

So i looked into this and it seems its because i dont have the right permissions on the list. But when i check the permissions i have Full control.

What am trying to achieve is actually simple, get a list of documents inside a specific folder in a Document library.

I dunno have any permissions on the Document library but i have full control on some folders inside that Document library.

Here is the code am using.

function RenommerDossier(Foldername) {

    var myQueryString = "<View><Query><Where><Eq><FieldRef Name='Title' /><Value Type='Text'>" + Foldername + "</Value></Eq></Where><OrderBy><FieldRef Name='Title' /></OrderBy></Query>";
    var MyUsername = 'Steve'
    myDocLibrary = GetListByname("Documents des juges");//my custom function, works good

    var context = new SP.ClientContext.get_current();
    var query = new SP.CamlQuery();

    var stringFullFolderUrl = 'MyDocumentLibrary/' + MyUsername + '/' + Foldername;

    myFolders = myDocLibrary.getItems(query);


        Function.createDelegate(this, this.OnLoadBibliothequeDossierSuccess),
        Function.createDelegate(this, this.OnFailedLoadDossier)

If anyone could help i would be glad, thank you ;)

share|improve this question
up vote 3 down vote accepted

Just for starters, while reading your code, I just noticed that your caml query does not have a closing </View> tag.

it should be like this:

var myQueryString = "<View><Query><Where><Eq><FieldRef Name='Title' /><Value Type='Text'>" + Foldername + "</Value></Eq></Where><OrderBy><FieldRef Name='Title' /></OrderBy></Query></View>";

See if it works out. Also, it would be great if you could post the code for GetListByName() function.

share|improve this answer
was just that ! thanks alot ;) – Dr.Denis McCracleJizz Apr 13 '12 at 17:57

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.