Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- EventReceiverDefinitionCreationInformation receiver = new EventReceiverDefinitionCreationInformation();
- receiver.EventType = EventReceiverType.ItemUpdated;
- //Get WCF URL where this message was handled
- OperationContext op = OperationContext.Current;
- Message msg = op.RequestContext.RequestMessage;
- receiver.ReceiverUrl = msg.Headers.To.ToString();
- receiver.ReceiverName = RECEIVER_NAME;
- //Add the new event receiver to a list in the host web
- requestList.EventReceivers.Add(receiver);
- ctx.ExecuteQuery();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement