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)

0
votes
2answers
437 views

Custom Event Receiver - Copy To sub Folder [closed]

I need to copy my files from one document library to another document library which reside on another site and Document library contains number folders and sub folders.. The same structure should be ...
0
votes
2answers
874 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
117 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 ...
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 ...
5
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 ...
8
votes
4answers
560 views

Save metadata on this list as social tags

On the UI, for a document Library settings, under "Enterprise Metadata and Keywords Settings" there is an option to "Save metadata on this list as social tags" Is there a way to activate this, ...
0
votes
1answer
565 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 ...
1
vote
2answers
75 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
128 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 ...
8
votes
3answers
4k views

Event handler vs. event receiver

http://msdn.microsoft.com/en-us/library/ms453149.aspx says To create the event handler 1. Start Microsoft Visual Studio 2010. 2. On the File menu, point to New, and then click Project. 3. In Project ...
1
vote
1answer
139 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
129 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 ...
1
vote
2answers
1k views

Move a document from one library to another library using event receiver

Suppose one document is uploaded to the Shared Document library, I need to move the document to an other library say List. There I have to create a folder with the document name and needs to place the ...
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 ...
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 ...
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
871 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 ...
1
vote
2answers
343 views

BCS Security Access Using Secure Store in code question

I have Secure Store and also Kerberos setup on my development and production farms. I am using Event Receivers to access BCS data. I have verified that if I simply impersonate a user that has access ...
1
vote
3answers
348 views

how can i know Items in Tasks list viewed by user(something like “Last Viewed” and “Last Viewed By”)?

for every list-item in Lists we have two columns or fields by the name of "Modified" and "Modified By". you got the idea, i wanna have two columns or fields for Tasks List by the name of "Viewed" and ...
2
votes
2answers
578 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
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
1answer
504 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
590 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 ...
2
votes
1answer
902 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
458 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 ...
2
votes
2answers
406 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 ...
6
votes
3answers
9k views

How can I detect whether a specific column changed in an SPItemEventReceiver.ItemUpdated event (SP 2010)?

I've got some code I need to run in an ItemUpdated event receiver method, but only if the value in specific column changed during the update. My initial thought is to also implement some code to grab ...
11
votes
2answers
896 views

Why is my workflow DependencyProperty event handler not firing?

I have a custom workflow activity (SharePoint 2010) with a Dependency Property defined as follows: public static DependencyProperty TaskChangedEventPropertyEvent = ...
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
770 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 = ...
5
votes
5answers
2k views

ItemAdded event receiver is not firing

My ItemAdded event recevier is not firing when the Word Automation Services adds a file to a Sharepoint document library. If I manually debug the ItemAdded event receiver, it is getting triggered. I ...
0
votes
1answer
322 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
928 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 ...
1
vote
1answer
189 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 ...
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 ...
3
votes
1answer
678 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 ...
1
vote
2answers
847 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 ...
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 ...
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, ...
0
votes
2answers
476 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
2answers
554 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
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
768 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 ...
1
vote
1answer
414 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 ...
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
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
934 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
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 ...