Release 2.7

Rating: No reviews yet
Downloads: 959
Change Set: 92d73ba4fd93
Released: Oct 7, 2016
Updated: Oct 7, 2016 by omlin
Dev status: Stable Help Icon

Recommended Download

Source Code camljs.js
source code, 63K, uploaded Oct 7, 2016 - 902 downloads

Other Available Downloads

Source Code camljs.d.ts
source code, 24K, uploaded Oct 7, 2016 - 57 downloads

Release Notes

Changes

  • Added ModStatField for working with moderation status (Approved, Rejected, Pending)
  • Fixed problem with boolean fields EqualTo. Code e.g. BooleanField("field").EqualTo(someBoolVar) is now working correctly.

ModStatField example

Example below will show titles of all items in "Documents" library that are rejected:

    var context = SP.ClientContext.get_current();
    var list = context.get_web().get_lists().getByTitle("Documents");

    var camlQuery = new CamlBuilder().Where()
        .ModStatField("_ModerationStatus").IsRejected()
        .ToCamlQuery();

    var listItems = list.getItems(camlQuery);
    context.load(listItems);
    context.executeQueryAsync(function() {
        var e = listItems.getEnumerator();
        while (e.moveNext())
        {
            console.log(e.get_current.get_title());
        }
    })

Reviews for this release

No reviews yet for this release. (Previous release: 4.5 stars out of five with 2 ratings and 1 review)