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
2answers
458 views

OnQuickLaunch property in ListAdded

For an event receiver, I want to execute some custom code when a list is added to my site. I want to use the OnQuickLaunch property of the list, but that doesn't seem to correspond to the "show on ...
2
votes
2answers
652 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 ...
7
votes
1answer
880 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 ...
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 ...
0
votes
4answers
405 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 ...
10
votes
2answers
892 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 ...
0
votes
2answers
81 views

Spsecurity. RunWithElevated Privileges not working

This Code is working very fine with admin rights but when i tried using it with normal user didnt work. I have also provided user full control on the virtual directory folder. public override void ...
0
votes
2answers
617 views

Unable to use SPEmailEventReceiver

I'm attempting to create a SPEmailEventReciever on an Email enabled library...The problem is that intellisense is not showing that class for me, so I am unable to inherit from it. MSDN shows it in ...
1
vote
4answers
6k 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 ...
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 ...
1
vote
2answers
699 views

SharePoint 404 not found when canceling an item event

I have a SharePoint 2007 list with an event receiver, its logic is very simple: public override void ItemDeleting(SPItemEventProperties properties) { //Base event ...
4
votes
1answer
533 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. Thank you.
0
votes
1answer
522 views

Get the inserted values from inside a ItemAdding event

Is it possible to get the values that were inserted (to create an item in a list) from inside the ItemAdding event? For ItemAdded the data is available in properties.ListItem, but for ItemAdding this ...
1
vote
1answer
81 views

Sharepoint Foundation 2010 events

I have an installation of sharepoint foundation. I was wondering if I can catch the event where a folder is created in a document library to do some more actions in sharepoint foundation. Can I follow ...
1
vote
0answers
311 views

Document library event receiver when creating documents

I created an event receiver that processes some information in docx files when uploaded to the library. I do this in ItemAdded event. Everything works fine when the file is uploaded. When the files ...
3
votes
1answer
838 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 ...
2
votes
2answers
547 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 ...
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 ...
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 ...
0
votes
1answer
656 views

Event receiver feature update

I am developing an event receiver in VS2010. To test the event receiver I deploy it to development using the functionality within VS 2010. This works without problems. However my concerns start when ...
4
votes
1answer
1k 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 ...
2
votes
1answer
905 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 ...
1
vote
1answer
1k views

Event receiver (type documents) fires for almost everything, including new usergroups, new sites etc

I have created an event receiver with the "documents" as templateid (101). <Receivers ListTemplateId ="101"> When I upload a document, the event gets fired. So no problem here. However the ...
0
votes
2answers
934 views

Problem renaming a file in document library programmatically

I want to use a FeatureEventReceiver to rename Home.aspx -> Old_Home.aspx. When i activate the feature rather than Home.aspx getting renamed it gets deleted/disappears (i.e. missing when i refresh ...
3
votes
1answer
118 views

Custom numbering scheme for document libraries

I need to create an event handler for a document library that will give custom Id's to documents and folders in it. The top folders will be prefixed with capital letters, folders and documents in ...
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
2answers
867 views

How to order a group of web parts added dynamically?

Preface: I did not come up with this implementation, just dealing with it. I have a web part zone that gets 3 content editor web parts loaded into it dynamically through the feature receiver. The ...
1
vote
1answer
129 views

alternate access mappings and list event handlers

I have a tricky problem with list event handlers (item checking in).. I deployed a site level feature with itemcheckingin event for sharepoint 2010. If I access the sharepoint site using the url's ...
0
votes
1answer
626 views

Custom Event Handler to handle Emails in Project Server

I am working on writing an event handler that handles the OnSending event of Project Server in 2010. I am very new to writing event handlers in MS Project and require your help in getting started on ...
3
votes
1answer
2k 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 ...
6
votes
1answer
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 ...
1
vote
2answers
76 views

What is the recommended way of giving one Sharepoint user control over deletion of list items?

I have many (29) Sharepoint calendars, each with a separate owner. I would like to have anyone able to book an appointment in these calendars, but for deletion to be handled only by the calendar ...
1
vote
1answer
285 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 ...
1
vote
1answer
140 views

Best way to clean up production Site ListItem Versioning

I realized a minor flaw in my event receivers for a List with versioning enabled. I used the ListItem.Update() instead of ListItem.SystemUpdate(). In addition I did not use This.EventFire = false. ...
0
votes
2answers
132 views

On Check-in, how do I detect a new file

Right now I have a SPItemEventReceiver that overrides ItemCheckedIn. It checks out the file, creates/marks a hidden field, and checks it back in. The reason for setting a property on the file is to ...
0
votes
2answers
483 views

hour glass or something like that during webprovisioned event receiver

After a site is provisioned my code is continue to run. Is there a way to put hour glass or some animated image until i hit the last line of the code? public override void ...
1
vote
1answer
106 views

Disable Web-scoped features on Web deletion

I have a SPWeb ( http://example.com/site ), created used a custom web template, with several features activated on its scope. When I delete the SPWeb it would be desirable that all the features ...
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 ...
1
vote
1answer
479 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
899 views

How to make jQuery AJAX request with a HTTP Handler in SP10?

I'm developing a SP 2010 Visual Web Part that needs to load some data via AJAX. I found this very helpful article but I'm having some doubts about it. I have the Visual Web Part project, inside I ...
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
2answers
589 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 { ...
0
votes
3answers
966 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
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 ...
2
votes
1answer
931 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 = ...
1
vote
1answer
2k 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
1k views

Updating a record from an event receiver and a workflow

In my situation, I have records being added to a record center that are immediately declared as a record. There are some fields that are associated with these list items that I need to be able to ...
1
vote
2answers
293 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 ...
1
vote
1answer
520 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
607 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 ...