Use the adding or updating events. And then update the title within the "ProcessEvent" as follows:
public SPRemoteEventResult ProcessEvent(SPRemoteEventProperties properties)
{
SPRemoteEventResult result = new SPRemoteEventResult();
result.ChangedItemProperties.Add("Title", "NEW Title");
result.Status = SPRemoteEventServiceStatus.Continue;
return result;
}
or
public SPRemoteEventResult ProcessEvent(SPRemoteEventProperties properties)
{
SPRemoteEventResult result = new SPRemoteEventResult();
if (properties.EventType == SPRemoteEventType.ItemAdding ||
properties.EventType == SPRemoteEventType.ItemUpdating)
{
// Generate Image Search for Flower
result.ChangedItemProperties.Add("Title",
"My New Title");
result.Status = SPRemoteEventServiceStatus.Continue;
}
return result;
}
Reference:
http://code.msdn.microsoft.com/office/SharePoint-2013-Add-list-2c6e71e0
No comments:
Post a Comment