/*push newly selected items in the observable array*/
var selectedItems = this.get_itemsSelector().getSelectedItems();
for (var i = 0; i < selectedItems.length; i++)
If you're like me and you run into a deserialization error when you try to publish content with a single-select dynamic item field control, there's one more tweak to make in the JS:
/*Gets the value of the field control.*/
/*on publish if we have items in the kendo observable array
we get their ids in a aray of Guids so that they can be persisted*/
i = 0; i < data.items.length; i++)
(selectedKeysArray.length > 0)
// return selectedKeysArray;
// just return a single item here
Also, if the selected value isn't showing up in your form, you may need to update the way the filterExpression is constructed in set_value:
var filterExpression = 'OriginalContentId == ' + value.toString();
'OriginalContentId == '
Jon, thanks so much for posting that. New Sitefinity user and this was driving me nuts trying to figure out the deserialization error I was getting.