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
1
vote
3answers
3k 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 ...
1
vote
2answers
2k 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
771 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
2answers
323 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
130 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
2k 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
126 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 ...
0
votes
0answers
2k views
SP 2010 Templates and Feature Stapling [closed]
In 2007 as well as it seems in 2010, feature stapling doesn't seem to be applied to templates. I am feeling short on time and was just wondering if anyone has seen some code out there that would work ...
2
votes
2answers
2k 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
751 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 ...
3
votes
1answer
1k 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
635 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
390 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
207 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
404 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
636 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 ...
7
votes
1answer
943 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
650 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 ...