event-receiver

How to update SPItemEventReceiver assembly version for a list in SharePoint?

Howdy, Still in the learning process with SharePoint. We have an SPItemEventReceiver compiled into its own assembly. We are using STSDev to package up a SharePoint solution with this EventReceiver as a feature. I am not assigning the SPItemEventReceiver to a specific ListTemplateId within the elements.xml, but am instead linkin...

SharePoint: Error on unregistering an EventReceiver form a ContentType

Hi, I've got some problems unregistering some eventreceivers form a contenttype. The contenttype and the receivers were deployed and registered by myself so I don't try to remove any MOSS built-in or internal eventreceivers. I trying to archive this with the following code snippet: using (SPSite site = new SPSite("http://wssdev06/"))...

Update Files in Sharepoint Document Library

Simply put, I have a custom editForm.aspx in a document library, that uses my own custom dll. When a user edits a record, I can update all the properties associated with the file, however, when you update the actual document(ie replace it) and then Update() (Or SystemUpdate()), you get the following : The file BLAH.doc has been modified...

How can I debug a SharePoint EventReceiver with Remote Debugger?

Hi! I have written an SharePoint EventReceiver (Windows SharePoint Services 3.0) and want to debug it with Visual Studio 2008 SP1, which runs on a different computer. I have tried the following steps: Installing the event receiver (I know that this works because a log file proves that the code is executed). Registering my event receiv...

How to execute code when a view is updated in sharepoint?

How to execute code when a view is updated in share point portal? I can not write an event receiver for it because it only fires when list items are updated. I want to write a handler of some sort that gets executed every time a view is updated. What are my options? By updated view I mean columns are added or removed. ...

Attach EventReceiver to all lists of a sharepoint site

Can we write an eventreceiver that gets fired when any list is updated. The listtemplateid that we have to specify for an eventreceiver makes our code specefic to one breed of lists. What if we want to have the code execute for events on all lists of site? ...

Error loading and running event receiver Microsoft.SharePoint.Workflow.SPWorkflowAutostartEventReceiver

I have a custom SharePoint workflow attached to a custom ItemAdded event receiver that was working fine up until the last type I promoted it using WSPBuilder. My code is very close to this example: http://www.codeproject.com/KB/sharepoint/MOSS%5FFolderContentTypeWF.aspx I used WSPBuilder in the past but not for this project and it se...

Sharepoint : Event Receiver : Item Adding

Anybody used the "ItemAdding" method successfully in an Event Receiver in Sharepoint for validation? I think it just can't work properly for validation purposes because it seems that : You can't access the data you just entered in a form If you add an error message, instead of displaying the form back with your error, Sharepoin...

An unhandled access exception has occurred, msmq, Sharepoint error

I have an issue that is occurring after my server reboots. I have some features in SharePoint, for doing various things. One thing they do is add items into a couple of different MSMQ queues. Immediately after a server reboot, if I try to log in to SharePoint and I go to a custom page of mine, and click on a button within that page (whic...

SPItemEventReceiver Context SiteId/WebUrl Incorrect

I have created a SharePoint Event Receiver, that fires on Item Update. The receiver needs access AfterProperties and ListItem. When firing the event receiver from a SharePoint web application using an IP address (http://10.0.4.50/sites/), it throws a FileNotFoundException, when accessing SiteId And WebUrl in SPItemEventProperties. The W...

Sharepoint item updating event - cancel event back to editform page?

I have an event receiver for a content type to validate some data in the ItemUpdating event. If I cancel the event (some of the data isn't valid for example), I set the properties cancel to true: properties.Cancel = true; properties.ErrorMessage = "..."; SharePoint cancels the updating event ok, but shows the standard SharePoint error...

How should I organize SharePoint Event Receivers in Visual Studio?

We have several custom lists, each of which has several event receivers associated with it (although only a couple have actually been written as of now). This event receivers handle a mish-mash of individual events and perform various bits of functionality. My question is how to organize them in a Visual Studio solution/project in a way ...

Problem with event receiver in visual studio 2010

Hi everyone, I am trying to figure out how to get the title of a list item from the base.ItemAdding(properties); I know it's somewhere in properties, because what I want to do is copy the item that was just added to another list, meaning that the same item will be added to another list, can anyone help me get the the value of the fields...

Sharepoint synchrounous event receivers

Hi all I have a question about the synchrounous event receivers in Sharepoint 2007. As example, lets look at the event ItemUpdating: Is it safe to assume that the update operation will succeed if I don't cancel it manually? I know the event could be cancelled by another event receiver. But assume that there is no other event receiver a...

How would I create a theme setting event receiver for Sharepoint 2010?

Currently we have a custom theme applied to Sharepoint 2010 main page. When a new site is created, it has the default theme. We would like all newly created sites on this Web Application to use a specific theme that we specify. I would like to create an event receive for Sharepoint 2010 that sets a specific theme when a new site is prov...