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)

1
vote
0answers
179 views

Accesing Lookup Field values only works on Administrative user [closed]

I have SharePoint Foundation 2010 Installed as a Farm on a Windows Server 2008. Since it doesn't let you install it without Active Directory, I went ahead and installed AD also. After installation, I ...
1
vote
1answer
459 views

“Cannot add file”-error when working with document library programmatically

I have two libraries, one with forms(xml) and one with a custom document content type. I have an event receiver ItemUpdated on the form library, which interprets the added/modified form, and creates ...
1
vote
1answer
1k views

Sharepoint 2010 Item Opened Event Receiver

I need to detect when a user opens a document in a specified list, and log their view in another list, however I see no method in SPItemEventReceiver for detecting such an event: ...
3
votes
1answer
337 views

SPFile object not correct/updated/propagated in ItemAdded of my event receiver - after the first time

I have a form library with a custom form associated. A user clicks "New form", inputs data in the form, and the form is saved to the library. Meanwhile, my logic in the eventreceivers generate a Word ...
1
vote
1answer
284 views

SPFile is empty the second time the logic is run

I'm developing event receivers in SharePoint 2010. I have a doc. library, when someone adds to this library, a infopath form must be filled out and saved. When the form is saved to the library, my ...
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 ...
7
votes
4answers
7k 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 ...
1
vote
1answer
1k views

“View Document” Event for Document Library?

I'm trying to capture the View document "event" of when a user clicks on a document in a document library and it opens up the document in Word or Excel... There is not such an event receiver and ...
1
vote
2answers
282 views

Debugging SP2007 Event Receiver in Visual Studio 2005

I am trying to debug an event receiver by attaching to the SP sites w3wp.exe process, however the breakpoints are not being hit, and VS2005 is telling me no symbols have been loaded. The Event ...
0
votes
2answers
2k views

Error Handling in Asynchronous Event Receivers

What are the best practices for error handling in Asynchronous Event Receivers? I'm currently writing an ItemAdded Event Receiver. The Status and ErrorMessage properties only seem to be relevant for ...
0
votes
3answers
921 views

Linkbutton OnClick event incorrectly firing on page load

My click events are firing on linkbuttons on page load, before the link has been clicked, any ideas? (This is in a Visual web-part hosted in SP2010) This is my code: <asp:LinkButton ...
1
vote
3answers
3k views

Linkbutton onclick not working in a Visual Webpart

Im having issues with the onClick event on LinkButtons (possibly all controls) not working, in a Visual Webpart I am writing for SP2010. Simple example of what i am doing: public partial class ...
6
votes
2answers
3k 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 ...
11
votes
8answers
7k 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 ...
1
vote
1answer
1k views

ListAdded Event Receiver not Firing for List Instances

I have a List definition in Visual Studio which is instantiated using a List Instance. This list definition has an event receiver which overrides the ListAdded event. I am able to get the ListAdded ...
0
votes
1answer
77 views

How to map workflow task to the originating workflow

I would like to fire an event when Workflow Task is completed and I would like to check the original item and workflow that created the task. But I cannot find any value among the Workflow task ...
0
votes
1answer
2k views

Get containing folder/list for SPFile item

I have an ItemAdded event receiver that is exporting files as they are added to a list. In my event receiver I want to find the containing folder of the item. This folder may be a SPFolder object or ...
0
votes
1answer
200 views

what event reciever to overide for document lib when changing filename

I have a custom list which I have written a SPItemEventReciever for and it works. But when I do the same for a document library it doesn't fire. Is there anything I have to do if it is a document ...
2
votes
0answers
512 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
2answers
2k views

How to deploy a sandboxed Event Receiver to SharePoint 2010 Foundation?

I am working on a test environment where is installed Windows Server 2008 R2, SharePoint Foundation 2010 and Visual Studio 2010. I have developed and debugged a new Event Receiver for a Document List ...
3
votes
3answers
5k 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 ...
3
votes
2answers
3k 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 ...
0
votes
3answers
1k views

Create subsite using custom site template programatically

I Have a requirement where when a list item is created , a new subsite sould get Created using custom site template.(MOSS 2007) User should be able to select the custom template(present in site ...
2
votes
1answer
883 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 ...
0
votes
1answer
349 views

How to add a EventReceiver for ALL users on sharepoint?

Does anybody know, how I can add an EventReciever to a List, so that it is called from ALL users that are doing action. For example: I register an EventReceiver that catches the event "ItemAdded". ...
2
votes
1answer
134 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 ...
1
vote
1answer
3k views

SharePoint Document Library Item Level Permissions

Have a document library in MOSS 2007. Item-Level permissions are not surfaced in the default SharePoint UI for Document Libraries, however the WriteSecurity and ReadSecurity properties are available ...
3
votes
2answers
145 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 ...
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 ...
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
903 views

Attaching an Event Handler to only one content type or list

Could someone help and explain how I can attach an event handler on a custom content type or a particular list? Currently, when I deploy my event handler as a feature and activate the feature, it is ...
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?
1
vote
1answer
665 views

How do I create an event listener without using a feature?

I want to create an event listener for SharePoint. I need to do that without using a feature. Any ideas?
0
votes
4answers
404 views

SiteDeleting Event handler

I am writing a code which does a restore of site collection programatically. I am using Site Deleting Event handler. I need to take backup of individual Site, not the Site Collection. How should i ...
1
vote
1answer
224 views

WebDeleting Event for New Sites created ? ?

I am using the WebDeleting event which is based on features. Just activate the feature, and whenever a web is getting deleted, the event handler throws a message saying "Web can't be deleted". ...
0
votes
3answers
482 views

Error in deleting a SharePoint Discussion forum topic

I'm getting a "Cannot complete the action" error message when deleting posts from discussion forums on our sharepoint install. This happens to discussion forums at any level in any of the subsites. ...
0
votes
2answers
737 views

SPList.ContentTypes.EventReceivers returns NULL

I am trying to create a feature that uses the API for associating an ItemAdded event receiver to a Discussion List. I was associating the Event Receiver to the SPList, however, i don't want the event ...
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 ...
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 ...
1
vote
1answer
1k views

ItemUpdated firing twice

I am adding custom meta-data to item that user uploaded item["Title"] = "My Title"; item["Column1"] = "column1"; item.Update(); When I comment out the item.Update() then the itemUpdated event does ...
8
votes
1answer
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 ...
1
vote
1answer
713 views

Custom Field Control with TreeView with EventHandler issues

I have got a Custom Field Control in SP2007 (inheriting BaseFieldControl) with an ASP.NET TreeView control in the ascx. This works fine with checkboxes enabled so Users can select from the tree. But ...