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
671 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
1answer
208 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
175 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
326 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
79 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
199 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
1answer
436 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
1k 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
468 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
708 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
1k 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 ...
0
votes
2answers
420 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
541 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 ...
1
vote
1answer
101 views

Access exceptions when trying to add a content type to list

In the following method, 'list' is simply an SPList ("Documents"). I'm attempting to add ContentTypes to the list and then update it. This code is found in the FeatureActivated event of an event ...
0
votes
1answer
242 views

Reporting Services Subscriptions doesn't fire Event Receivers

I have a SPItemEventReceiver on a SharePoint library which renames added files. Normally this works fine (Upload from website / WebDav). There is also a report server subscription which drops pdf's ...
0
votes
1answer
479 views

Help with Blog EventReceiver, not firing

Ok so I have a blog site and I need to change the name of the author of each post to 'Anonymous' after he saves the post. I created an EventReceiver project in Visual Studio and gave the URL ...
1
vote
1answer
1k views

Unable to attach an SPEmailEventReceiver to my list

I'm trying to link an SPEmailEventReceiver to my document library.. First of all I created the EventReceiver using the Visual Studio 2010 Add -> Event Receiver -> List Email Events -> Document ...
0
votes
1answer
602 views

How to enable an Event Handler to intercept upload from email in document library

I have a Document Library with an email associated with the OOTB feature. When I send to the library an email with some attachments, every attachment is stored with one of the OOTB methods (divided in ...
0
votes
1answer
289 views

delete feature using event receiver on a farm feature

there is a farm feature and there is a web-scoped feature. web feature does stuff on multiple sites. If ever i want to get rid of the feature on all sites, I have a farm feature that has on ...
0
votes
2answers
755 views

“Thread abort exception” in event receiver after adding a solution?

I am developing an event receiver for the web provisioned event. It does quite a few things, culminating to add and deploying a solution and activating a feature from it. When I do the following: ...
1
vote
1answer
471 views

Add solution from within event receiver - how to sort out “access denied” errors?

I'm handling the WebProvisioned event in order to add and deploy a solution that's relevant to the site being created. The solution is being created dynamically based on parameters of the site but for ...
0
votes
1answer
159 views

How can I get custom CSS to load into a publishing subsite?

I have a SharePoint 2010 farm that will have thousands of site collections in it. Each site collection will be a personal externally facing publishing site collection for individual employees. Each ...
1
vote
1answer
207 views

Staple onto MyContent

I made my farm level stapler and my site level staple features, for SPSPER#0 it fires on MySite creation, so I presumed SPSMSITEHOST#0 would be MyContent, but nothing gets fires at all. I set the ...
0
votes
1answer
164 views

list template copy code-behind is not working

My goal here is to create a list template with code-behind on my server and copy it to a completely different Sharepoint server. The problem is that my server has Visual Studio 2010 while the other ...
0
votes
1answer
1k views

Error loading and running event receiver Could not load file or assembly CUSTOM DLL The system cannot find the file specified.

I have created an EventReceiver that references a library I created in the same Solution (2 different projects). Whenever I add an item to the associated list I see this error in the log: ...
0
votes
1answer
86 views

SPEmailEventReciever - is this avaliable in sandbox solutions

I was wondering if you could write an sandbox solution using the SPEmailEventReciever class. In the SharePoint SDK documentation it says that the SPEmailEventREciever is not avaliable for use with a ...
1
vote
2answers
155 views

Is there anyway I can find out if user uploaded multiple items in ItemAdded Event

I have a "ItemAdded" event, I want to check Number of documents uploaded if a user uses "Upload Multiple Documents" for uploading. Normally what happens is when a user adds a item they are taken to ...
1
vote
1answer
177 views

Large update in Event Receiver

I wonder how should I make a large update in Event Receiver by executing it in other thread. Normally it would look like that: public override void ItemUpdating(SPItemEventProperties properties) { ...
1
vote
0answers
103 views

How do I prevent Office applications to update one of my SPListItem properties?

I have a document library in SharePoint whith a custom content type. There is one custom field that is set by an item added event receiver each time a new document is uploaded. My problem occurs when ...
0
votes
1answer
286 views

copy an event receiver to a different server

My work is requiring me to create an event receiver for an itemAdding event for an existing list on a Sharepoint Server. My problem is that while I have access to a Sharepoint Server, I do not have ...
0
votes
2answers
224 views

Generating the HTML code of a Server Page in the ItemAdded Event Receiver

In our ItemAdded event receiver code, we would like to call Server.Execute(new MyPage(), writer, false) to statically generate the HTML code for MyPage and store it in the RootFolder so client can ...
0
votes
1answer
281 views

What is the SPListTemplateType or SPListTemplateId or ListUrl of ACL of an item?

What is the SPListTemplateType or SPListTemplateId or ListUrl of the list that appears when clicking on the item permission button on the edit control block or the button on the ribbon of any item ...
1
vote
2answers
1k views

How to use SharePoint notification from Event Receiver

I have an event receiver, which fires when item is being deleted ( ItemDeleting event ). I have some logic that checks whether item can be deleted or not, and if it can't, I need to show notification ...
0
votes
1answer
28 views

Possible to get a list of scheduleditems?

Is it possible to get a list of ScheduledItems from SharePoint in C# (event receiver)? For example, I've created a ScheduledItem and called the .Schedule() method. I'd expect this ScheduledItem to ...
0
votes
1answer
651 views

The URL is invalid. It may refer to a nonexistent file

public override void ItemCheckingIn(SPItemEventProperties properties) { base.ItemCheckingIn(properties); #region Automatic Scheduling ScheduledItem scheduledItem = null; ...
1
vote
1answer
162 views

Is it possible to check if a page is scheduled for publishing?

I can create a ScheduledItem in an event receiver, but how do I check if a list item is scheduled? What I've tried: IsScheduledItem method (ScheduledItem class) - but this method: "...confirms that ...
1
vote
1answer
316 views

Email EventReciever

I have a massive problem that I need to solve. I have a document library that is a catch all dumping ground for emails that are forwarded there by our users out in the field. With in these emails are ...
1
vote
1answer
373 views

Automatically schedule a page on publish

When the user publishes a page, I need to automatically schedule it with a start date being as soon as possible, and the end date being a year from the start date. I've tried the event receiver ...
0
votes
3answers
473 views

Event Receiver which tries to create a Prefix will throw Security Exception

I'm trying to use an Event Receiver on a List to create a Managed Path with Wildcard-inclusion in the parent WebApplication. I tried to handle it with the following code (reduced to show the idea) ...
2
votes
1answer
197 views

Will feature receiver get activate if user has no permissions to a site?

Here's what I need...User does not have access to a site (http://myserver/sites/MySite). When user tries to access they are redirected to ugly AccessDenied.aspx. I was researching and found that ...
0
votes
1answer
125 views

Using Sharepoint UI is there a way of knowing what event receiver is installed against a library

Using Sharepoint UI is there a way of knowing what event receiver is installed against a library? I have a event receiver that adds installed against document library and all it does is to set item ...
0
votes
3answers
432 views

an event receiver does not allow to add item that already exists

i want an event handler for document library (itemadding and itemChekingIn) that does not allow to add a file to that document library that already been in there.does anyone can give me hint for ...
0
votes
2answers
501 views

Differentiate in ItemUpdated (ER) if file was edited or overwritted

I've an ItemUpdated Event Receiver, and I need to make different operations depending if the file was updated throw UI or overwritted. Is there any internal field that reflects this 2 different ...
0
votes
1answer
997 views

ItemAdded event running with user permissions (SharePoint 2010)

My understanding is/was that by default asynchronous event receivers ran under system permissions, while synchronous event receivers run under user permissions -- and that ItemAdding is synchronous, ...
0
votes
1answer
264 views

List versioning detect field level changes

I need to detect changes with each on each item update, )but i don't want to use the before, after properties ) My question is: If i enable list versioning can i diff 2 versions to detect changes, ...
1
vote
4answers
1k views

Single line of text field validation in Sharepoint 2010 list

I have single line of text field in a Sharepoint 2010 list. I need to validate the particular field. The user will enter the number by starting with I or F. How do I validate the field if the user ...
0
votes
1answer
318 views

Event Receivers on Add/Remove Users

I need some design ideas for a requirement to audit when uses are added/removed from an object. I need to collect the user doing the add/remove, date time, and reason for adding. I need to do this to ...
1
vote
0answers
932 views

List ItemUpdated Event not firing when updating item from code

I have a problem with my eventreceiver. It is set to fire on updating item from a list, and works very good when I update that item from Sharepoint's web UI. However I have some code that goes through ...
3
votes
3answers
406 views

Add file watermark as it's uploaded

I've been trying to add a watermark to files as they are uploaded to SharePoint. I tried using several events: ItemAdding, ItemUpdating, ItemCheckedIn. In ItemUpdating and ItemCheckedIn the file is ...
0
votes
1answer
347 views

Event Receiver Item Added for Multiple Files uploaded

I am trying to add few details for a item that is added to a list to SQL database table using a stored procedure, it works perfectly but when I upload multiple files it adds all of the items into the ...