Tag Info

New answers tagged

1

my issue got resolved with help of below link https://dotnetadil.wordpress.com/2012/04/11/sharepoint-item-deleting-event-receiver-deny-delete/ I used below code public override void ItemDeleting(SPItemEventProperties properties) { base.ItemDeleting(properties); using (SPWeb web = properties.OpenWeb()) ...


1

It's mostly likely because you already have an instance of the SPList (from another context) before you try to execute the deletion of an EventReceiver. That's why the ThreadAbortionException is thrown. Instead of sending in the list, send its name instead and get the list inside the RunWithElevatedPrivileges codeblock. private void ...


2

I would try the following: Get the List again from the elevated Web instead of the instance you pass to this method. Try searching your eventreceiver additional by assembly or classname to make sure you don't delete some SharePoint internal Receiver. finally{ web.AllowUnsafeUpdates = false;}


2

Try to add System.Threading.Thread.Sleep(1000); right after item.Update(); to give the console application time finish executing the call to the event receiver. Try that and let me know if it works. More: Sometimes your asynchronous post events ItemAdded ItemUpdated don't run from Console Application


0

Here is sample of working with remote event receivers on PowerShell through CSOM. I hope this helps: Add/delete and list Remote Event Receivers with PowerShell/CSOM


0

I got the solution as per @Eric Alexander comment. We can find the file size difference so we will identify that it is file updated or field update.


0

In order to register an event receiver to a specific list by URL, you have to specify the ListUrl property, like this: <Receiver ListUrl="Lists/YourList"> <!-- the rest of your code --> </Receiver> If your list URL is different, change it accordingly.


0

You don't need Item added event for that.You can use Email Received method to trap the event when list receive an email message Email Received is fired just after the incoming email is received to the list before any other item event receivers Item adding is also fired after that. ...


0

You can write an event receiver for document library and check on itemupdated or updating event if the publishing state has been changed. You can use the ModerationInformation to see if it is in a published version or not. Approved is published. If you don't have approval, you can go for "Level", where 1 is published and 2 is unpublished. Example: ...


3

I'm grasping at straws here, there isn't a lot of information on the topic about this. I did stumble upon a post that may give clues as to why it is happening and perhaps a work around: SPFile.MoveTo(), at first glance, looks to be a very straightforward method where a file can be moved from one folder to another. Trying to use it and have an ...


1

Use properties.AfterProperties["Age"] = "Your Value"; See Set custom field value in ItemAdding event for more information.


1

Fix was to use an XML space escape for the library name <?xml version="1.0" encoding="utf-8"?> <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <Receivers ListUrl="Test&#032;List"> <Receiver> <Name>DocumentFactoryItemAdded</Name> <Type>ItemAdded</Type> ...



Top 50 recent answers are included