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
1answer
525 views

Item Adding throws server error in '/' application

Here is my code. It works but also throws following error. public override void ItemAdding(SPItemEventProperties properties) { base.ItemAdding(properties); if (ValidFile(properties) == false) ...
1
vote
4answers
613 views

itemAdded event handler or javascript when a file size greater than 1MB

Easiest way to implement the 1mb limitation on file upload. Do I use event handler to take care of this or javascript? I can have the event handler ready as I have messed with it before. It is better ...
6
votes
2answers
4k 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 ...
0
votes
1answer
2k views

Error loading and running event receiver Microsoft.SharePoint.Publishing.Internal.PublishingWebEventReceiver in Microsoft.SharePoint.Publishing

I am seeing the following error in my application log: Error loading and running event receiver Microsoft.SharePoint.Publishing.Internal.PublishingWebEventReceiver in Microsoft.SharePoint.Publishing, ...
1
vote
1answer
502 views

When/If/Where to call base event receivers

My questions are: Is it always necessary to call the parent (base) event receiver, assuming the event is to proceed to completion? I've recently learned that the base version cannot be called in ...
4
votes
2answers
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 ...
0
votes
1answer
350 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". ...
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 ...
0
votes
1answer
981 views

Custom Alert Notification IAlertNotifyHandler Handler not firing

I'm trying to create a custom Alert Notification handler that implements IAlertNotifyHandler to intercept immediate alerts generated by changed to publishing pages. I've followed this guide, and also ...
1
vote
1answer
120 views

Manifest file for registration of event handler in SP 2007

I'm trying to create a feature to register my event handler to a specific list. I'm building it like I would a normal feature. However, I'm not sure how to define my Elements file. The file for my ...
0
votes
2answers
810 views

Programmatically registering a Sharepoint 2007 event handler

I have an event handler for the ItemAdding event of a document library. However, I cannot get it to handle the event unless I register the event handler using the Sharepoint Event Handler Manager. ...
3
votes
1answer
182 views

Error building a content type in SP 2007

I have an event handler that catches an ItemAdding event and changes the content type on the fly. This is my code to build the content type: SPContentType baseContentType = ...
0
votes
1answer
325 views

Event handler running and activated but not receiving

I have installed an event handler to catch ItemAdded and change the content type if the item is a folder. I have installed and deployed this solution using a WSP and have activated it, but it doesn't ...
2
votes
2answers
970 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
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
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 ...
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 ...
3
votes
1answer
715 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 ...
3
votes
3answers
2k 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 ...
1
vote
1answer
425 views

Accessing Lookup Values fails with Exception when the connected user is not the SharePoint Site Collection administrator

In sharepoint 2010 Foundation, after we installed a simple event receiver that mainly runs when certain items are added/modified, we noticed, during manual testing, that if we logged in as a user ...
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)
1
vote
2answers
574 views

Inside folder files are getting deleted in Sharepoint 2010

In a Document library I have a content type say "ABC" and I have added an eventhandler to it. I have itemdeleting so that user can not delete file for specific reason. Problem comes when user makes a ...
2
votes
2answers
788 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 ...
0
votes
3answers
490 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. ...
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
341 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 ...
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
1answer
78 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
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
0answers
517 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
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 ...
2
votes
1answer
911 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 ...
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
151 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
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
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. ...
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
682 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?
1
vote
1answer
231 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
2answers
746 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 ...
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
719 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 ...
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 ...