Tag Info

Hot answers tagged

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 ...


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


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 ...


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> ...



Only top voted, non community-wiki answers of a minimum length are eligible