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

0
votes
1answer
867 views

Detected use of SPRequest for previously closed SPWeb object

I've got an event receiver that fails, seemingly inconsistently. I've checked the ULS logs and I can see the 90hv Detected use of SPRequest for previously closed SPWeb object. Please close SPWeb ...
1
vote
1answer
126 views

Adding EventRecevier in SandBox Sharepoint2010

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

Instantiating SPListItems in Event Receivers - Best Practices

In the MSDN article Best Practices with Event Receivers it is clearly stated: Do not instantiate an SPWeb, SPSite, SPList, or SPListItem object within an event receiver. The article goes on to ...
0
votes
2answers
198 views

Can we find out in Event Receiver group Users like in a CS file

In CS file I used this code and it's worked: SPWeb site = SPContext.Current.Web; int managerGroup = site.Groups["Właściciele witryny Main"].ID; if ...
1
vote
1answer
374 views

SP2013 : Generate an autoincrement identifier (YYYYMMDD9999) based on creation date for a document

I need to generate a record id for a document, with format YYYYMMDD9999 where 9999 is a autoincrement number per day. This id must of course be unique, but i have no idea how to be sure to avoid ...
3
votes
1answer
5k views

Feature activation error: System.InvalidOperationException: Operation is not valid due to the current state of the object

i have taken one List Email event receiver(Type is EmailReceived) and that event receiver attach with document library. when i am activate that feature got error. i have check on ULS Viewer. error ...
2
votes
1answer
940 views

How to update SPListItem in ItemFileMoved?

I have a document library. In ItemUpdated I move the file to a different location (based on date) and I want to add some metadata in ItemFileMoved to the file's new columns (which I added). The ...
1
vote
1answer
159 views

InfoPath, and Calling a instation of Template InfoPath from Event Receiver

I want to call a form of InfoPath from Event Receiver. How Could I set a field infopath a Values, from Event Receivers to sets a Values on infopath fields which could I Validate and show or hide a ...
0
votes
1answer
48 views

Connecting infopath with the data from the list

When I creating a infopath conected with list in creator from Microsoft InfoPath Designer the bookmark which called developer is hinding, and I can't editing or writing any of code. How could I ...
0
votes
1answer
91 views

How Could I edit InfoPath in Visual Studio

If I add infoPath from Infopath Designer its blocked me all the Modal Dialog fired from Event Receiver. I want to edit InfoPath form to don't block My Sharepoint Modal Dialog. Now no one dialog boxed ...
0
votes
1answer
299 views

Sharepoint modal popup don't shown when the Infopath form are on the site

I tried to add Infopath form on my project, but when I add the Infopath form some of PopUp which are corelated with Infopath and shows errors od data didn't shown What should I do to shown A Modal ...
0
votes
1answer
330 views

Can't use SPItemEventProperties ListItem on ItemAdded in Event Receiver

I'm using event receivers to modify some of the inputs in a SharePoint 2013 site. They are fairly straight forward, here is a simple example public override void ItemAdded(SPItemEventProperties ...
1
vote
2answers
489 views

Event Receiver redirect to Visual web part

Here is my Event Receiver to redirected to my visual web part: public override void ItemAdding(SPItemEventProperties properties) { base.ItemAdding(properties); properties.Cancel ...
1
vote
0answers
98 views

Email not received in Document Library when Event receiver Added [closed]

Email not received in document library when Email event receiver is added to this library..
2
votes
1answer
1k views

Event Receivers not added when installing wsp

I have a set of event receivers for a SharePoint 2010 content type and Library. Previously, these would install and automatically be activated when I ran a script to install the wsp solution. I dug ...
6
votes
2answers
803 views

How can I tell if a document is 'being published'?

I need to use the relevant event receiver to tell if a document is being published, is this possible? I will settle for has 'just been published' - i.e. I have no preference between itemupdating and ...
1
vote
1answer
217 views

Deleting SPListItem in event receiver - very long time

I have an event reciever with ItemDeleting action, in which i try to delete an item from another list (I cant realy use cascade delet behavior here, I need to do some stuff that requires the ...
0
votes
1answer
119 views

Adding EventReceiver to Dynamic List

I am trying to add a Event Receiver to a list that is dynamically created (by code). So i cannot add a event receiver on the list directly. I found a way to attach a Event Receiver to the list by ...
1
vote
0answers
546 views

sharepoint 2010 list groups from event receiver to form or dialog box?

How can I get a list of groups in a form or dialog box to select one or more groups, and then assign permissions to the document? Here in this code: using System; using System.Security.Permissions; ...
0
votes
1answer
77 views

Userfeedback after file was uploaded to library

I need to print out a feedback after a file was uploaded to a DocLib. I tried several things over the event receiver (add statusbar as a control or a clientscript) but everything faild. I´m a bit ...
2
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
412 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
40 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 ...
2
votes
2answers
579 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
555 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
670 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
525 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
82 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
240 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
425 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
298 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
85 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
97 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
505 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 ...
1
vote
1answer
364 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
174 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
866 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?
1
vote
1answer
294 views

Delete SharePoint Calendar Recurrence Event

Item Deleting event is not fired when delete single recurrence event.
1
vote
1answer
217 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
216 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
280 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
78 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
257 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
3k 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
137 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
351 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 ...