Event Receivers are a piece of managed code that responds to SharePoint events when specific triggering actions occur on a SharePoint object.

learn more… | top users | synonyms

3
votes
2answers
1k views

Using the ItemAdding EventReceiver to update multiple fields based on values from one field

I have a custom SharePoint 2010 SPfield of type SPFieldMultiColumn. The data in this column is stored in a delimited string, which is parsed and rendered in a readable format in most areas (list view, ...
1
vote
0answers
487 views

Set Record Declaration Settings programmatically

I created a feature receiver whereby on activation will activate and set certain features and its properties. One of that feature is InPlaceRecords. Below is my code in the FeatureActivated method:- ...
1
vote
1answer
41 views

An event to be fired on editing a file

As title says, I need an event to fire when a listitems file has been edited. I appreciate this isn't as simple as it having it's own event, which is why I've tried to make use of the itemupdating ...
3
votes
2answers
639 views

Can the ItemAdding event be used in a Sandbox?

Can the ItemAdding event be used in a Sandbox? I need to perform a task when a Item is a added/adding, it has to be synchronous (item added is async so i cant use that). If i cant use the ...
2
votes
2answers
2k views

Best way of getting SPWeb in Event Receiver [Best Practices]

what would be the best way of getting SPWeb and List in context below, specially when list title can be different for different cultural websites, private bool ...
0
votes
1answer
631 views

WebProvisioned Event Receiver Firing Twice

I am creating sites and subsites with object model from a console app. And what i realized is, it fires twice for every newly created subsite. I checked from Sharepoint Manager if the event receiver ...
1
vote
1answer
815 views

WebProvisioned Event Is Not Firing When Creating SPWebs Programmatically

I have a WebProvisioned event receiver and i do some work in this event receiver. When i create new webs from a console application programmatically, it seems the event receiver does not fire? Is this ...
2
votes
2answers
614 views

How to find out page layout value in an event receiver for publishing page

I need to find out page layout on ItemUpdated from the SPItemEventProperties in a page library. What property value should I be looking for.
0
votes
1answer
86 views

How we can update the sherepoint elements in event Receiver ItemUpdated or Item Updating, or add a column in ItemsAdded

I tried to do Cascade deleting in two of my colums. If I deleted in First List record i wated deleted all records at Secound List bounded with records from List One. I adding bounded data first in ...
1
vote
1answer
289 views

How to prevent document editing and properties updating

I need to be able to prevent the document in document library to be edited and it's properties updated when the custom document property DocState has a value Reviewed. Should I use document library ...
0
votes
1answer
519 views

How to add in Event Receiver Items Deleting

How can I delete a elements in secound list bounded with secand list if I delete elements in first list. I write a code, but i don't know how to delete a bounded item, please help: public override ...
0
votes
1answer
394 views

How to update existing record of list one of two in Event Receiver

I have got a problem how to update Secound list which is made by First list. All must be in Event Receiver. How Can I made difrent Event Receivers update to Diferent Lists Could You Help me with his. ...
0
votes
1answer
2k views

Problem with save conflict when adding content type to list

I have a feature receiver with the following code: public override void FeatureActivated(SPFeatureReceiverProperties properties) { SPSite site = (SPSite)properties.Feature.Parent; ...
0
votes
1answer
86 views

How to create ConfigurationList in SharePoint site for EventReceiver?

I want to create ConfigurationList which should store/display information like, with 2 columns(Title & Value). For Example: ContentTypes: 101;107 Event Types: Add;Update;Delete Location: ...
0
votes
1answer
102 views

How to get task name while deleting in EventReceiver?

I have written my Custom function into the EventReceiver created on Tasks. public override void ItemDeleted(SPItemEventProperties properties) { base.ItemDeleted(properties); ...
0
votes
2answers
586 views

Add WebPart to publishing page in Synchronous ItemAdded Event Receiver

I'm trying to add a webpart to a publishing page after the page is created, so I've created an Event Receiver, the problem is, if I make the Event Receiver Synchronous (As it should be) the code ...
2
votes
1answer
468 views

SPListItem.Update() not firing ItemUpdating

I'm updating item in SPListItemCollection using SPListItem.Upadte() but my event receiver is not receiving ItemUpdating/ItemUpdated events (breakpoints are not hit on either handlers). Sample code ...
1
vote
1answer
196 views

MOSS 2007 Event Receiver and Exchange Web Services API

My goal is to use Event Receiver to add Outlook Calendar Appointements when a ListItem is adding. My Sharepoint Server is Moss 2007 and it is on a Win2008 R2. I got and installed the Exchange ...
0
votes
2answers
995 views

How to Deploy the Feature with Scope=Site & Scope=Web for WebParts & EventReceiver respectively?

I have only 1 Visual Studio Project. It contains 1 EventReceiver(for DocumentLibrary) and multiple-WebParts. I have defined the Scope=Site of Feature.xml file of Project. I have created 1 custom ...
0
votes
1answer
27 views

Is it posible to create a EventReceiver for opening a site?

I want to start an EventReceiver when a site or a list opens. How can I do this? Is this possible?
0
votes
1answer
364 views

Delete SharePoint Calendar Recurrence Event

Item Deleting event is not fired when delete single recurrence event.
1
vote
1answer
238 views

Library ItemUpdating - distinction between versioning of existing files, and changing metadata of existing files

I am currently facing challenges in distinction between updating an item, and creating a new version of same item. The ItemUpdating eventreceiver is hit in both cases. Requirements for the library ...
0
votes
1answer
226 views

Creating New-SPWeb from PowerShell & WebProvisioned Event Receiver?

I have a WebProvisioned event receiver and i do some work in this event receiver. When i create new webs from powershell, it seems the event receiver does not fire? Is this an expected situation? How ...
0
votes
1answer
2k views

Event Receiver Item adding - How to get a user name?

At Event Receiver Item Adding I must add name of worker which is adding a items to the list. Here is my code: SPListItem item = lstOtherList.Items.Add(); item["Kontrakt"] = ...
7
votes
1answer
305 views

How to know if another event / user is running on an SPListItem (Sharepoint 2010)

I have a Sharepoint 2010 farm in which is deployed my solution. This solution provides some "data mantain" of some content types. Let me explain: Suppose I add a file in a document library: when I ...
0
votes
1answer
83 views

Event receiver on navigation items changed

I want no headings and no pages/lists/document libraries on my navigation, as the sites subsites and other items are created. So Is there any events available for navigation items changing ? So that i ...
0
votes
1answer
268 views

Enable-Feature powershell-command in object model

How to do Enable-SPFeature equievalent in object model. I want to enable some features (lists) in my publishing site in event receiver. For example: Enable-SPFeature announcementslist -url ...
0
votes
2answers
4k views

SharePoint 2010 - How to remove Event Receivers from Content Types

I have a Content Database that contains Event Receivers referring to a Solution / Feature that was incorrectly removed. These Event Receivers are embedded in every Content Type in my Site Collection ...
1
vote
1answer
143 views

How to prevent alerts from SPEmailEventReceiver?

I have been struggling with a small but irritating problem for a while now and suddenly I ran out of ideas. I have implemented an email event receiver in Sharepoint 2010. The event receiver creates ...
2
votes
0answers
426 views

Start SharePoint 2010 Designer Workflow using Visual Studio Event Receiver

I have created one send email workflow using SPD 2010 for my custom list (like Licnese Management). Now, I need to start that workflow only on specific condition like, If Deactivation Date / Valid ...
8
votes
3answers
3k views

Workflow and EventReceiver execution order

I have an event receiver, and I'm capturing the "ED" events (Added, Edited). I also have a Workflow on the list that is triggered on Item Added and Updated. Does the workflow get called before the ...
0
votes
2answers
2k views

Event receiver on site collection creation

Are we able to code an event receiver on site collection creation? I have so custom site definitions, i do everything with features. So i need to activate a feature on site collection creation.
1
vote
1answer
113 views

List Event not Firing - Registered against List, Activated Feature

$web = Get-SPWeb "http://----/PWA/Test Project/" $list = $web.Lists["Risks"] $list.EventReceivers This shows 3 events; ItemAdded, ItemDeleted, ItemUpdated. Below is an example of one of them to show ...
0
votes
2answers
3k views

New EventReceiver events not firing

I have an event receiver written by someone else. It originally came with events for ItemCheckingIn and ItemCheckedIn, but we needed something to handle simple metadata updates, too. Since those ...
0
votes
0answers
936 views

Event manager error: Could not load file or assembly or one of its dependencies. The system cannot find the file specified

I'm receiving the following error in my ULS logs when I try to create a new website in a migrated content database. Event manager error: Could not load file or assembly 'xNamex, Version=3.0.0.0, ...
1
vote
2answers
245 views

Detecting item is updated through service or UI

I have having a situation where I have an event receiver that uses ItemUpdated event to automatically start workflow. This is causing problem when user clicks on Edit in Excel and check in items from ...
0
votes
1answer
832 views

Error while creating Event Receiver

This is Sample of my Code SPList list = new SPSite(siteURL).OpenWeb().Lists[listName]; SPEventReceiverDefinitionCollection eventReceivers = list.EventReceivers; SPEventReceiverDefinition ...
0
votes
2answers
252 views

AfterProperties and BeforeProperties in managedmetadata fields returns different strings depending on language

I have a managed metadata column in a list. With values in English: Brussel in french: Bruxelles. I need to compare in the ItemUpdating event the before and after properties. I know that the before ...
1
vote
0answers
217 views

Publishing page is firing ItemUpdated event twice the first time it is edited

I have a custom SharePoint solution that creates an enterprise wiki site based on a word document of a particular format. I have an ItemUpdated event receiver attached to the Pages library for some ...
0
votes
3answers
461 views

Event Receiver trouble in permission changed

I have the following problem with this code: public override void ItemUpdating(SPItemEventProperties properties) { base.ItemUpdating(properties); const string ...
0
votes
0answers
85 views

Changing items after submit via an Event Receiver

I would like to set up an itemadding and itemupdating event receiver such that it automatically populates some values on submit and then gives the user the opportunity to change those values. ...
0
votes
1answer
158 views

Event Receiver for two lists. When inserting in one List it updates the second list

How do I add an Event Receiver to two lists? One must be updated when an Item is inserted in a second list. I used public override void ItemAdding(SPItemEventProperties properties) But what should ...
0
votes
1answer
279 views

How can I prevent a user from changing a formula in a calculated column?

I would like users to be unable to change formulas of some calculated columns, both from the list settings and from datasheet view. I am currently trying this via event receiver but I have went back ...
1
vote
2answers
560 views

ItemAdded event not firing after document conversion in drop off library

I'm trying to build events for a drop off library in a records centre in order to convert Word docs to PDF using the Word automation service. The conversion event files on ItemCheckedIn, and works ...
0
votes
3answers
2k views

rootWeb.AllProperties[“__InheritsCustomMasterUrl”] = “True”; not working

I am developing a branding project, in this project i have custom master page, i can successfully deploy it and automatically apply to the root web. But i want all the subsites inherit the master page ...
1
vote
3answers
589 views

How to activate feature in a custom site

I have created a publishing web template. Now I need to activate a feature once the site is provisioned. In order to achieve this, I've created an event receiver with something like this: public ...
0
votes
3answers
984 views

Prevent Item Overwrite Event Receiver

I want to prevent users from overwriting items that have the same name. When users add items to a library there is a checkbox indicating files should be overwritten if they have the same name. In ...
0
votes
1answer
2k views

403 Forbidden immediately after creating web

I can't tell exactly what's causing the 403 Forbidden error (that's literally all of the information I have in the browser regarding the error) but this is the scenario: I navigate to my application ...
1
vote
2answers
558 views

“YSOD” Stack Trace Shown in Synchronous Event Receivers, instead of SharePoint Custom Error Page

Original Title: <nativehr>0x81020089</nativehr> in ItemUpdating (i.e. Synchronous) Event Receiver Edited Question: In the past when you created an item-based, synchronous event ...
0
votes
1answer
604 views

“Detected use of SPRequest for previously closed SPWeb object” within Event receiver but no error when run in test harness

I have a very strange issue which I cannot explain. We have and event receiver and within this we instantiate our own class that does all the work we need it to do. As part of this we pass in an SPWEB ...