Questions tagged [event-handlers]

Event handlers is a program statement which is called from an event. The event can be a human striking a key on the keyboard or pushing a button on a web page

Filter by
Sorted by
Tagged with
20 votes
1 answer
1k views

Memory leak in Microsoft.Sharepoint.Taxonomy.TaxonomyItemEventReceivers?

I've been trying to locate some memory leaks we've noticed in our ULS (EventID: nask, An SPRequest object was not disposed ... etc). On my dev environment, and at least 2 other cleaner installs, the ...
Nicholas Mulder's user avatar
18 votes
9 answers
19k views

Event Receiver Firing for all Lists - even when ListUrl is set

I have two custom list definitions - List 1 and List 2, both with different ID's for the Type in the elements.xml. List 1 is called 'List1' and the other is called 'List 2', note that the second list ...
user avatar
17 votes
8 answers
7k views

Content Type Event Receivers Impossible to Remove

I have a very odd situation in my SharePoint staging environment. We recently stood up a new SharePoint 2010 server (single WFE + a DB server), and attached a backed-up content database from our ...
JasonV's user avatar
  • 793
14 votes
3 answers
20k views

Detect whether a specific column changed in an SPItemEventReceiver.ItemUpdated event

I've got some code I need to run in an ItemUpdated event receiver method, but only if the value in specific column changed during the update. My initial thought is to also implement some code to grab ...
JohnFx's user avatar
  • 651
14 votes
6 answers
13k views

Deploying EventReceiver project with target of WebApplication from VS fails when activating features

I am trying to deploy an event receivers project with a deployment target of WebApplication as part of my web parts package (also has a target of WebApplication) through Visual Studio and encountering ...
Jason's user avatar
  • 241
13 votes
2 answers
1k views

Why is my workflow DependencyProperty event handler not firing?

I have a custom workflow activity (SharePoint 2010) with a Dependency Property defined as follows: public static DependencyProperty TaskChangedEventPropertyEvent = DependencyProperty.Register("...
Shaun O'Callaghan's user avatar
11 votes
3 answers
6k views

Which process do event receivers run under?

Some MSDN articles say that synchronous event receivers run under w3wp.exe, and asynchronous event receivers run under owstimer.exe. For eg, this one: http://blogs.technet.com/b/speschka/archive/...
ashwnacharya's user avatar
  • 1,679
10 votes
3 answers
8k views

Event handler vs. event receiver

http://msdn.microsoft.com/en-us/library/ms453149.aspx says To create the event handler 1. Start Microsoft Visual Studio 2010. 2. On the File menu, point to New, and then click Project. 3. In Project ...
amac44's user avatar
  • 101
10 votes
4 answers
799 views

Save metadata on this list as social tags

On the UI, for a document Library settings, under "Enterprise Metadata and Keywords Settings" there is an option to "Save metadata on this list as social tags" Is there a way to activate this, ...
Jorge Carvalho's user avatar
10 votes
2 answers
2k views

What happens if an earlier Event Receiver throws an error?

Let's say I set up an ItemAdded event receiver with a sequence number of 12345. On this list there're two other event receivers that run before it; one for ItemAdding, and an earlier one for ItemAdded....
Stu Pegg's user avatar
  • 4,623
10 votes
1 answer
2k views

Where to load data in the lifecycle of custom webpart

I have a webpart where I access a sharepoint list and render contents of that list. At the moment I'm fetching the data in CreateChildControls(). When a button is clicked the data will be fetched ...
Tom Bola's user avatar
  • 381
8 votes
2 answers
3k views

Preventing document Uploading to Document Library in SharePoint 2010

Here is my scenario. I would like to allow the only certain file types (doc,docx,pdf,ppt,pptx) into my document library. I wrote an ItemAdding event receiver for a document library as follows. But I ...
Share's user avatar
  • 483
8 votes
1 answer
1k views

Event handlers on User Information List

Has anyone ever tried adding an event handler to the User Information List of a site collection? Or for that matter, an alert? I'd try it out, but was just wondering if there were any issues I should ...
Paul Lucas's user avatar
  • 4,246
7 votes
1 answer
15k views

How to disable event firing outside an event?

How do I disable event firing in code that is not part of an ItemReceiver? E.g.: I have an FeatureActivated event receiver which update a list (adds column) and updates all items to populate the new ...
Dribbel's user avatar
  • 2,906
7 votes
4 answers
11k views

Race condition in SPListEventReceiver.ListAdded - Save Conflict

I am currently developing an Event Handler for SharePoint 2010 which sets defaults for Document Libraries on creation (content types, version settings etc). I am having a problem with Save Conflicts ...
Daniel Symonds-Lloyd's user avatar
7 votes
4 answers
8k views

Event Reciever ItemAdded fired twice

I'm trying to do some treatement after creating an item but the treatement is done twice because in my code after creating the item, I'm updating it , so the event reciever get fired twice: first when ...
Glolita's user avatar
  • 419
7 votes
1 answer
2k views

ItemUpdated event handler runs four times

I have a list in the rootweb, and a list in a subweb. I want to update/add when something changes in an item in the subweb. This method is invoked in an ItemUpdated event receiver. The problem is that ...
tarjeieo's user avatar
  • 2,538
7 votes
1 answer
4k views

Execution order of event receivers and workflow on a list

Is it possible to know beforehand whether event receivers on a list will always execute before any workflows associated with that list?
Mike H's user avatar
  • 695
7 votes
1 answer
2k views

List event receivers not triggered after quick editing/grid editing

I have a custom Sharepoint 2013 list with event receivers attached to it (adding, updating, deleting). However, it looks like the event receivers are not triggered when the user is adding/editing in ...
Egil Hansen's user avatar
7 votes
1 answer
638 views

How to know if another event / user is running on an SPListItem (Sharepoint 2010)

I have a Sharepoint 2010 farm in which is deployed my solution. This solution provides some "data mantain" of some content types. Let me explain: Suppose I add a file in a document library: when I ...
Ziba Leah's user avatar
  • 1,987
7 votes
1 answer
3k views

Adding a list item with PowerShell doesn't trigger event receiver

I have a simple list with an event receiver for the following events: ItemAdded ItemUpdating ItemDeleting I confirmed that the event receiver fires when adding/updating/deleting an item from the ...
George Durzi's user avatar
6 votes
2 answers
3k views

SystemUpdate(false) using SPWeb.ProcessBatchData()

Is it possible to use SPWeb.ProcessBatchData() and not trigger all the event handlers attached to a list? I would like to process a large list in quick time, but I don't want all the event handlers ...
ashwnacharya's user avatar
  • 1,679
6 votes
1 answer
9k views

How to get a field value of the item in ItemDeleted event handler?

I need to get the value of ListItem field in ItemDeleted event handler. Only value of one numeric field. But properties.ListItem == null. And AfterProperties, BeforeProperties also do not work. Is ...
SDG's user avatar
  • 61
6 votes
4 answers
7k views

Get ContentType in ItemAdding Event Handler

I need to change a field in the item being added based on its content type. This needs to happen before the item has been added - hence ItemAdding event receiver. Using ItemAdded is no good since the ...
Eugene's user avatar
  • 421
6 votes
2 answers
3k views

How can I tell if a document is 'being published'?

I need to use the relevant event receiver to tell if a document is being published, is this possible? I will settle for has 'just been published' - i.e. I have no preference between itemupdating and ...
JᴀʏMᴇᴇ's user avatar
6 votes
3 answers
5k views

SPItemEventReceiver ItemUpdating and BeforeProperties / AfterProperties

I've bound and ItemUpdating event to a document library of a MOSS publishing site, I’m then trying to compare the Before and After properties. When I amend the field in the UI I expect the two values ...
Rob's user avatar
  • 536
6 votes
5 answers
4k views

ItemAdded event receiver is not firing

My ItemAdded event recevier is not firing when the Word Automation Services adds a file to a Sharepoint document library. If I manually debug the ItemAdded event receiver, it is getting triggered. I ...
Shiva's user avatar
  • 61
5 votes
1 answer
7k views

What is the scope of DisableEventFiring()?

When I call DisableEventFiring() what events are blocked? All events? On the current item? All events using the current EventReceiver? What happens if two threads change one item and one ...
Dribbel's user avatar
  • 2,906
5 votes
1 answer
202 views

SP2013 Event Receiver action open page library\list

I want to create Event Receiver, but I need an event type that would work when opening the library\list page for example. Tell me which event to use? Or is Event Receiver not the best solution?
user avatar
5 votes
1 answer
3k views

Enlarge Newsfeed images on SharePoint 2013

I am a bit stumped why I have not found much information on this topic or why no one is asking the question. Maybe it is just not possible. My question being: Are you able to enlarge Newsfeed images ...
SP_Admin's user avatar
  • 121
5 votes
1 answer
994 views

In a document library itemUpdated event receiver, how to tell if a file was just modified?

How do I know if it is the file being updated? Since it could just be the item properties.
Kyle's user avatar
  • 352
5 votes
2 answers
339 views

How to add style library event receivers?

how can I add an event receiver to the style library ? (can't find any templateid)
user9289's user avatar
  • 235
5 votes
1 answer
2k views

Is there a way to enable and configure incoming email for a document library using the C# api for sharepoint 2010

I've got a requirement to allow users to approve or disapprove certain actions by replying to auto generated emails. I've already got a good handle on how to use email enabled lists and event ...
AndrewSwerlick's user avatar
5 votes
1 answer
9k views

Feature activation error: System.InvalidOperationException: Operation is not valid due to the current state of the object

i have taken one List Email event receiver(Type is EmailReceived) and that event receiver attach with document library. when i am activate that feature got error. i have check on ULS Viewer. error ...
Jignesh Rajput's user avatar
4 votes
5 answers
5k views

SPItemEventReceiver ItemAdding - Differentiate between a file and a folder

I've setup a custom event receiver. The purpose of my event receiver is to stop people from uploading any file type except PDF's. Right now my code looks like this: if (properties....
Peter's user avatar
  • 347
4 votes
3 answers
209 views

Delete the item once it is added

I want to perform some Action once the item is added. I have a Custom List that reacts on Item Creation. If, at this level, i want to Delete the item immediately once it is added, how could I do? ...
Arun's user avatar
  • 41
4 votes
1 answer
1k views

ItemAdding event on list item to target a specific custom list

I have an ItemAdding event handler created and targeted to a Custom List. The event receiver seems to be firing on all custom list on the site. I wonder if I should target it to a specific custom list....
Jimbo Alba's user avatar
4 votes
4 answers
8k views

How can I remove an orphaned event receiver?

This began when we noticed the health analyzer reporting the following: [MissingAssembly] Assembly [ProjectSubsiteMaker, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f8132574c3fbdd6f] is ...
Nick Sarabyn's user avatar
4 votes
5 answers
12k views

How to get current logged user in event receivers?

I need to get the information about the user actually logged (as SPUser) inside an event receivers. The following line: Dim currentUser As SPUser = SPContext.Current.Web.CurrentUser does not work ...
Drake's user avatar
  • 435
4 votes
4 answers
2k views

Web Template - Receivers Not Firing

I have a custom web template used to provision site collections that activates features with onet.xml and is deployed as a farm solution. I've tried both feature receivers and event receivers (on ...
Adam's user avatar
  • 190
4 votes
2 answers
1k views

How to target events to different types of document libraries?

I have the requirement for multiple document libraries. Each document library will contain the same types of document, images, office documents; however, when items are added to the library, a custom ...
Mick Walker's user avatar
4 votes
1 answer
1k views

ItemUpdating event not firing on folder rename w/ Windows Explorer

I have an Item Updating event receiver that needs to fire when a document library folder is renamed. Everything works perfect when a user renames the folder with the SharePoint UI. However, if ...
andrew.petersen15's user avatar
4 votes
1 answer
292 views

Synchronous ItemAdded event. Do I need to explicitly call properties.Dispose()?

We have a SharePoint 2010 On-Prem solution. I have an ItemAdded event receiver which has been made synchronous using the Synchronization property. Now, when this event receiver fires, I have used the ...
Vardhaman Deshpande's user avatar
3 votes
3 answers
4k views

Unable to modify SPWebApplication properties from feature receiver - Access Denied

The scope of the feature is Web. SPWeb site = (SPWeb)properties.Feature.Parent; site.AllowUnsafeUpdates = true; // Set the Web Application's default error page SPSite siteCollection = new SPSite(...
Tim Gabrhel's user avatar
  • 2,325
3 votes
2 answers
2k views

How do I handle concurrency problems related to event receivers?

This is a problem that seems to pop up all the time, so I'm wondering if there is an authoritative answer somewhere. I'm using an event receiver (specifically, the ItemUpdated receiverthrough the "...
Geir Smestad's user avatar
  • 1,680
3 votes
2 answers
2k views

Attach an event receiver to profile property update

Do someone know if it's possible to attach an event receiver to profile updates? The goal would be to update an external system (such as a CRM) when a user is updating his profile.
E. Jaep's user avatar
  • 177
3 votes
1 answer
1k views

Determine if a document library is a sharepoint library

I'm adding some content types to every standard-document library which is created over the "List Added"-EventReceiver. When a web is created the are some new doclibs for example in a team site there ...
Steffen Schindler's user avatar
3 votes
3 answers
2k views

ItemAdding event and impersonation

I need to modifiy the Editor/Author (modified by/created by) SharePoint built-in fields in an ItemAdding Event Receiver on a list (I cannot use the ItemAdded event). For users with restricted ...
TripleChocolateCookie's user avatar
3 votes
2 answers
4k views

How to display errors in Event Receivers?

I am trying to implement a custom logic during the checkout of an item of a list in SharePoint 2010. For this reason I added an Event Receiver that ovverides the method ItemCheckedOut. The idea is ...
Drake's user avatar
  • 435
3 votes
2 answers
175 views

eventHandler only works for admin

It appears that my eventHandler only seems to receive the event when an Admin user updates a document on the list. Ive used the event manager made by brian wilson to register the event. Does anyone ...
user avatar

1
2 3 4 5 6