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

learn more… | top users | synonyms (1)

2
votes
5answers
4k views

Custom Event Receiver - Copy To Folder

I am in the process of writing a custom event receiver. The basic flow is as follows: Document is added to Library Based on metadata of document, we check to see if a folder within another document ...
2
votes
2answers
878 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.
2
votes
2answers
2k views

How do I get an SPSite from SPWebEventProperties?

How do I get an SPSite object from the SPWebEventProperties object passed into the SPWebEventReceiver.WebProvisioned method? public override void WebProvisioned(SPWebEventProperties properties)
2
votes
2answers
3k views

Event receiver attached to content type via XmlDocuments ignored?

I have a content type defined in Elements.xml and I want to add an Event Receiver. My Elements.xml looks like this: <?xml version="1.0" encoding="utf-8"?> <Elements ...
2
votes
6answers
4k views

How can I auto-increment a column?

I am working on a solution where I have a list with a column named LogIDNumber. For each new entry in the list, I would like to increment the LogIDNumber by one. I could use the ID generated by ...
2
votes
2answers
598 views

SPItemEventReceiver to log delete action

I am writing an event receiver that will log delete action (time and user only) of a deleted list item. Following is what it looks like. public class AuditDeleteReceiver : SPItemEventReceiver { ...
2
votes
2answers
4k views

event receivers and execution order

I am using some of these such as ItemAdded and ItemUpdated and I had altered the elements file to make this synchronous. I'm just curious as to what the order of execution is for all these handlers. ...
2
votes
1answer
110 views

SharePoint Document Library document delete

Please suggest your solution for the following scenario: A user deletes the document from document library and an e-mail has to be triggered to the admin notifying the information about the document ...
2
votes
2answers
408 views

Item Updated through different forms runs Item Updated event receiver

Simple but mind blowing question it is. Basically I am updating a specific list items through two different ways, one is using ASP.NET web forms and one is using default list forms provided by ...
2
votes
2answers
580 views

Modifying a document when uploaded

I am modifying Word and PDF documents when they are uploaded to a document library with an event receiver. ItemAdded runs perfect without any errors, I manipulate the documents and save them to ...
2
votes
2answers
412 views

Pop-up on event handler in MOSS 2007?

I have written an event handler using ItemDeleting event , instead of showing default error page when user try to delete a document from document Library I want to show a warning message in Pop-up box ...
2
votes
2answers
996 views

When can the content type be updated in code?

I have created an event handler for ItemAdded so that when an item is added on the site, my code checks to see if it's a folder. If it is, it should change the content type of that folder to a custom ...
2
votes
3answers
1k 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 ...
2
votes
3answers
2k views

Problem with ItemAdded event handler

Event handler ItemAdded is working. However, the site does not refresh right away. I am populating some column when an item is added. The column shows up fine but it is empty. If I refresh (or hit ...
2
votes
1answer
177 views

Using C++ dlls in event receiver

I am trying to use a legacy C++ dll that has around 5 C/C++ dependencies in SharePoint. I created a wrapper for the dll and it works fine in a test desktop program. I added the wrapper and all C++ ...
2
votes
1answer
341 views

Possible to attach an event receiver to the list of user alerts?

There's seemingly loads of ways of overriding the OOTB e-mail notifications for creation and deletion of user alerts - can't you just attach an event receiver to the alerts 'list' (is it an SPList?) ...
2
votes
1answer
111 views

Farm Based Custom Timer Job Feature

I am trying to create a custom timer job where feature is farm scoped and will run on a farm level, I am not able to find any decent tutorial that tells how to create a farm based custom timer job ...
2
votes
3answers
901 views

Sharepoint site throws exception on clicking save button after uploading a file

I have deployed an event reciever with item added event on a document library in sharepoint site. In item added event I am calculating the number of pages for the uploaded document and updated a ...
2
votes
2answers
695 views

Sharepoint development without Visual Studio on server machine

Till now I was doing Sharepoint development with Sharepoint server and Visual Studio on same machine. Now there is a Sharepoint 2010 installed on my client machine with no Visual Studio installed. I ...
2
votes
1answer
248 views

createsite event handler in sharepoint online

I am writing an event handler that will create a new site whenever the new item is added to the list. My issue is it creates a new site everytime but it does and does not (randomly) execute the code ...
2
votes
1answer
968 views

Disposing of objects in an Event Receiver

I have an ItemUpdated event receiver running on a library. Some pretty basic logic. Here's the gist of what I'm doing: SPWeb web = properties.Web; SPContentTypeId ParentCT_Id = ...
2
votes
2answers
803 views

Changing OOB content types on selected lists

My customer want to have a global taxonomy for all content. I have created content types that inherit from the usual content types (Documents, Pictures, Pages) that will contain this taxonomy. To ...
2
votes
1answer
928 views

ItemAdded Not Working

I’m trying to override the ItemAdded event handler for a Sharepoint 2007 document library. For some reason, it appears that the ItemAdded event is not firing. I can override the ItemAdding event no ...
2
votes
1answer
135 views

Event receiver will not change

I deployed an event receiver feature on a task list (it restricted access to the task for everyone except the assignee, among other things). Now the requirements changed, I commented out the ...
2
votes
1answer
2k 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?
2
votes
1answer
39 views

Content type eventhandlers gets bound to list

I have a custom parent content-type on which I apply 6 event-handlers. I then have 24 content-types based off of the parent content-type - thus inheriting the 6 event-handlers. - All defined in XML I ...
2
votes
1answer
660 views

Sharepoint Foundation 2010 : Unable to create new sites in my site collection

So I had originally upgraded an old WSS 3.0 site to SharePoint Foundation 2010 by the database attach method. Site worked fine for a couple months until now. Now we our unable to create new sites in ...
2
votes
1answer
666 views

SPContext.Current.FormContext.OnSaveHandler Not Firing from Custom Field Type Control

I am having the exact same problem described here. Unfortunately because I don't have 50 points yet I can't comment on it so I have to create a new duplicate question. I mean it's not "100% EXACTLY" ...
2
votes
1answer
3k views

Event receiver After Properties Item Updating Date field is one day off

Experts, Can anyone explain me why I am getting 1 day less From a Date Only picker in Item updating event receiver ... this happens for After properties value. Basically I am trying to validate ...
2
votes
2answers
147 views

Creation of a “Attend” button under each Event

I would like to ask if somebody could advise me how to create an "Attend" button in the Event form which appears when clicking on an Event. The goal is that there is a list of participants visible ...
2
votes
1answer
124 views

is the WebProvisioned event fired when using restore-spsite?

Can somebody confirm that the WebProvisioned event is not fired when using restore-spsite? I have made some tests and it looks like it's not the case but I would like to make sure. If it's not the ...
2
votes
1answer
934 views

Renaming a folder with event receiver

I need to rename a folder after it is created by a user. I am currently using an event receiver and try to rename the folder in ItemAdding without any success. In ItemAdding event the folder is not ...
2
votes
0answers
433 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 ...
2
votes
0answers
71 views

restore default incoming email settings

I wrote an email event receiver for a list, which overrode the default incoming email settings (I now only have an option to turn it on/off and set the email, and the rest is expected to be handled by ...
2
votes
5answers
3k views

How does Sharepoint Online Event Receivers work?

I have created this Sandboxed Event Receiver on ItemAdding on a custom list. It works on my on-premise server, but it does not work on Sharepoint Online aka. O365. Anybody know how to create an ...
2
votes
0answers
116 views

Error thrown after SaveBinary in ItemAdded event handler

I'm working on a ItemAdded event for a document library, and I'm running into this error in SharePoint 2007... The file Lists/Shared Audit Documents/1387/Audit Report.docm has been modified by ...
2
votes
1answer
215 views

How to update content of file using event recievers

I have created an event reciever for SharePoint Server 2010 with added and updated events. The work is being done whenever a doc file is added to my library, it generates a copy of that file in pdf ...
2
votes
0answers
520 views

ListInstance not firing all item event receivers [closed]

I have a feature that defines a number of list instances to provision whenever a new site is created using a particular site definition. The list template for one of these instances has an item event ...
1
vote
3answers
364 views

Is it possible to add something to a list without trigging the ItemAdded event

I have a situation where I don't want to trigger the ItemAdded event if an item is added to a list via a workflow. Is it possible not to trigger this event?
1
vote
2answers
661 views

Activating a feature after an SPWeb has been created

I am trying to ensure that a custom feature that I have written is activated when an SPWeb is created, and it has to be activated after all lists/libraries have been created (specifically the document ...
1
vote
4answers
2k views

How to delete an item on ItemAdding

I want to performe some Action on ItemAdding. I have a Custom List that reacts on Item Creation. In particular on Item Adding performs some action using the After Properties.. If, at this level, i ...
1
vote
3answers
2k views

Add item to list anonymously (not as anonymous user)?

I have a requirement that authenticated users should be able to anonymously add items to a list, i.e. they are authenticated but the Created By/Modified By field should not display their name. I could ...
1
vote
2answers
1k views

How to trace the ListAdded event for the entire SharePoint 2010 farm?

In our SharePoint 2010 environment, we want to enforce the users to choose the option "show user names in the survey list" (survey list) however there may be a time when user may choose "No" to this ...
1
vote
1answer
2k views

properties.Cancel = true not firing in ItemAdded event

I developed a custom event receiver class that overrides the ItemAdded method after the list item is added I want to make some checks and based on a certain condition I want to delete the added item. ...
1
vote
2answers
146 views

Saving changes made in a webpart

I currently have a webpart with a table which loads documents in itself. Every row has a checkbox control in the first cell. (Default: unchecked) I am using a second webpart which has a button. If ...
1
vote
4answers
2k views

How do I start a workflow automatically when a Contributor attempts to delete an item?

Contributors have the Delete privilege. In libraries and lists with Content Approval switched on, our policy is: Contributors may not delete draft items submitted by other users. Contributors may ...
1
vote
4answers
2k views

Problem with HTTP handler in Sharepoint 2010

I'm developing a visual web part for Sharepoint 2010. This webpart needs to get some data via AJAX. So I went for the HTTP handler + jQuery solution posted here. But I'm getting a problem when trying ...
1
vote
1answer
191 views

Feature Not Activating

I have an Empty SharePoint solution where I added an EventReceiver that attempts to create a new Diagnostic category to my SharePoint farm. To test I am setting a breakpoint on the FeatureActivated ...
1
vote
4answers
7k 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 ...
1
vote
5answers
1k views

How to use SP Service Account to add an item (with object model)?

I can add an item to SharePoint (with the object model) when I am logged in to SharePoint with an administrative account. However, if I change to another user who is NOT listed in the backend SQL ...