2

I have used two method to achieve my goal:

var REQUESTEXECUTOR = new SP.RequestExecutor(APPWEBURL);

REQUESTEXECUTOR.executeAsync({

        url: _ihda.appWebURL + "/_api/sp.appcontextsite(@target)/web/Lists/GetByTitle('Projects Info')/GetItems(query=@v1)?@v1={'ViewXml':'<View><Query></Query></View>'}&@target='" + projectPath + "'",

        type: "POST",

        headers: {
            "accept": "application/json;odata=verbose",
            "content-type": "application/json;odata=verbose",
            "X-RequestDigest": $("#__REQUESTDIGEST").val()

        },

success: function (data) {

            success(JSON.parse(data.body));

        },
        error: function (data) {

        }

This code return us error {"code":"-1, Microsoft.SharePoint.Client.ClientServiceException","message":{"lang":"en-US","value":"The HTTP method 'GET' cannot be used to access the resource 'GetItems'. The operation type of the resource is specified as 'Default'. Please use correct HTTP method to invoke the resource."

In alternative solution when I run using the TaxCatchAll field

http://prj/Projects/11181/_api/web/Lists/GetByTitle('Projects%20Info')/Items?$select=*,$expand=TaxCatchAll

then, this code return us error: The expression "*,$expand=TaxCatchAll" is not valid for subsite.

  • After marathon effort, I have solution of this issue..:) – RajeshSharepointGeek Oct 28 '17 at 5:08

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.