Giter VIP home page Giter VIP logo

Comments (2)

samperrow avatar samperrow commented on July 18, 2024

@donebydavid I do not do sharepoint development anymore, and I haven't used this little lib in several months, and I simply do not have the time to research issues. You are welcome to submit a PR and I can take a look.

But just giving this a quick glance, those 3 fields are among the default fields which are always returned for a recurring item. the fields prop is generally only meant to retrieve custom fields that are not returned by default.

from spcalendarpro.

pikebike avatar pikebike commented on July 18, 2024

@donebydavid
The fields are being ignored because the CAML query isn't set up to include the fields for calendar lists, so anything you list in the fields array gets ignored.

I updated the code at line 82 to this:
var endRecurringCaml1 = '<OrderBy><FieldRef Name="EventDate"/></OrderBy>';

After that I then added a new variable with the remainder like this:
var endRecurringCaml2 = '<queryOptions><QueryOptions><RecurrencePatternXMLVersion>v3</RecurrencePatternXMLVersion><ExpandRecurrence>TRUE</ExpandRecurrence><RecurrenceOrderBy>TRUE</RecurrenceOrderBy><ViewAttributes Scope="RecursiveAll"/></QueryOptions></queryOptions>';

Line 97 is what returns the query string, but the endQuery variable is what contains the fields, so I updated line 97 to this:
query += beginRecurringCaml + endRecurringCaml1 + endQuery + endRecurringCaml2;

Also, in line 107 he has the <fieldRef> tag as self-closing, but all of the references I see have them as open and closing tags, so I updated line 107 to:
viewFields += '<FieldRef Name="' + userObj.fields[i] + '"></FieldRef>';

After making those changes, all fields I input are added to the viewfields in addition to the default fields. But like @samperrow said, the fields you listed are the default fields and should be included regardless.

from spcalendarpro.

Related Issues (5)

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.