GithubHelp home page GithubHelp logo

Comments (2)

Aymkdn avatar Aymkdn commented on June 12, 2024

The code is correct. You just need to add the callback:

$SP().list("DDR").get({
  fields: "BaseName,FileRef,FSObjType",
  folderOptions:{
    show: "FilesAndFolders_Recursive"
  }
}, function(data) {
  for (var i=0; i<data.length; i++) console.log(data[i].getAttribute("BaseName"))
});

You can try this code into the browser console directly to print the result. Also, in the browser web console, you can check what the server returns.

Does it matter that the site is a subsite?

Yes it matters. If you call DDR but it's not in the current website, then it won't be able to find it. So if it's a subsite you need to add the URL of this website:

$SP().list("DDR", "http://website.com/site/subsite/").get({
  fields: "BaseName,FileRef,FSObjType",
  folderOptions:{
    show: "FilesAndFolders_Recursive"
  }
}, function(data) {
  for (var i=0; i<data.length; i++) console.log(data[i].getAttribute("BaseName"))
});

from sharepointplus.

 avatar commented on June 12, 2024

Thank you!! It's all working now. Now hopefully I can build on this to get my other operations working.

from sharepointplus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.