-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Labels
area:add-insCategory: SharePoint Add-in Development ModelCategory: SharePoint Add-in Development Modelstatus:to-be-reviewedIssue needs to be reviewed by Microsoft for additional follow up / review.Issue needs to be reviewed by Microsoft for additional follow up / review.type:archive-old-issueIssues which are closed as tool old for active workIssues which are closed as tool old for active worktype:questionQuestion... if answered, will be tagged as such.Question... if answered, will be tagged as such.
Description
Category
- Question
- Typo
- Bug
- Additional article idea
Expected or Desired Behavior
When someone is using the 'Copy To' functionality. Also all metadata of the document is copied. We want to prevent this by clearing out particular (custom) columns with an synchronous ItemAdding event receiver. When adding values to the 'ChangedItemProperties' Dictionary of SPRemoteEventResult we would expect that the values of those columns are updated within a ItemAdding Event on a Document Library.
Observed Behavior
This won't work in SharePoint Online, nothing happens when setting these values. Sample code:
SPRemoteEventResult result = new SPRemoteEventResult();
if(properties.EventType == SPRemoteEventType.ItemAdding)
{
result.ChangedItemProperties.Add("cusField", "test");
result.ChangedItemProperties.Add("Title", "test title");
result.Status = SPRemoteEventServiceStatus.Continue;
}
return result;
Steps to Reproduce
- Create an ItemAdding EventReceiver and add values to the ChangedItemProperties.
- Add an ItemAdding eventreceiver to a Document Library using PowerShell (Not a Provider hosted app solution)
- Use the Copy To functionality.
- Event Receiver is triggered, but values are not updated.
If this is not supported. What other options are there to check if Copy To was used? Update the values within a ItemAdded async RER?
Metadata
Metadata
Assignees
Labels
area:add-insCategory: SharePoint Add-in Development ModelCategory: SharePoint Add-in Development Modelstatus:to-be-reviewedIssue needs to be reviewed by Microsoft for additional follow up / review.Issue needs to be reviewed by Microsoft for additional follow up / review.type:archive-old-issueIssues which are closed as tool old for active workIssues which are closed as tool old for active worktype:questionQuestion... if answered, will be tagged as such.Question... if answered, will be tagged as such.