vendredi 20 février 2015

Changing DocumentSet Name in RemoteEventReceiver ChangedItemProperties Collection



I have a RemoteEventReceiver listening on ItemUpdating (synchronous event). The EventReceiver is registered to a Document Set Library.


Now I want to change some Properties during the event:



result.ChangedItemProperties.Add("Number", "00124");
result.ChangedItemProperties.Add("State", 1);
result.ChangedItemProperties.Add("Title", "My New Folder Name");
result.ChangedItemProperties.Add("FileLeafRef", "My New Folder Name");


so the "Number" and "State" Field are changed correctly after the update.


But the "Title" and the "FileLeafRef" are not affected.


I've already tried to only update the "Title" or "FileLeafRef" alone but that also had no effect.


So is there any way to update or set a new Folder Name to the Item with an EventReceiver?


And I don't want to go the way to update the ListItem directly.


I know that:



listItem["FileLeafRef"] = "My new Folder Name";
listItem.Update();


is working. But that will Trigger the EventReceiver another time.








0 commentaires:

Enregistrer un commentaire