Version 2.5.3
Changelog
- SharePoint API: improved support for composite field values namely
FieldLookupValue/FieldMultiLookupValue
,FieldMultiChoiceValue
, referexample 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();