Skip to content

Version 2.5.3

Compare
Choose a tag to compare
@vgrem vgrem released this 05 Feb 18:16
· 92 commits to master since this release

Changelog

  • SharePoint API: improved support for composite field values namely FieldLookupValue/FieldMultiLookupValue, FieldMultiChoiceValue , refer example 1 below ( related issues: #261)
  • OData request/response serialization optimizations (namely excluding metadata annotations from response by default)

Example : create list item and specify multi lookup & choice fields values:

$list = $ctx->getWeb()->getLists()->getByTitle("Tasks");

$taskProps = array(
    'Title' => "New task",
    'ParentTask' => new FieldLookupValue($taskLookupId),
    'PrimaryManager' => new FieldUserValue($userId),
    'Managers' => new FieldMultiLookupValue([$userId]),
    'TaskCategories' => new FieldMultiChoiceValue(["Event", "Reminder"])
);
$item = $list->addItem($taskProps)->executeQuery();