Tagged Questions

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
3k views

ItemAdding event not firing when submitting InfoPath form to form library

I created an event receiver in Visual Studio to handle three events in a form library: ItemAdding, ItemUpdating, and ItemDeleting. ItemUpdating and ItemDeleting work as expected when debugging, but ...
2
votes
0answers
109 views

Error thrown after SaveBinary in ItemAdded event handler

I'm working on a ItemAdded event for a document library, and I'm running into this error in SharePoint 2007... The file Lists/Shared Audit Documents/1387/Audit Report.docm has been modified by ...
3
votes
2answers
1k views

Move a document from library after adding it

I am using the ItemAdded event to fill in a metadata field. In the ItemUpdated event (after submitting the file properties diagog) - I want to move the file elsewhere. However, I get an error saying ...
2
votes
2answers
4k views

event receivers and execution order

I am using some of these such as ItemAdded and ItemUpdated and I had altered the elements file to make this synchronous. I'm just curious as to what the order of execution is for all these handlers. ...
3
votes
1answer
306 views

Listadded events on My Site omits Personal and Shared Documents creation

I want to have a feature which will change some settings on every list on My Site. Problem is i cant change settings for two main list: Shared and Personal Documents. For testing I have web feature ...
0
votes
2answers
569 views

Managed Client Object Model in Event Receiver - Event is not firing at all

When I use ClientContext context = new ClientContext("SITEURL"); in my event receiver, the event doesn't trigger at all. So my question is can I use managed client object model in event receivers. ...
0
votes
2answers
1k views

Populating Drop down on the basis of User Group

I am developing the SharePoint Portal in 2010 where i will be using a Dropdown with values in it. These Values will depend on the group to which the user belongs. For Eg. If Drop Values are A, B , ...
1
vote
1answer
2k views

response redirect in event handler

I try to redirect user after edit a list to another page in site. So I write this code at the end of my item_updated list handler Response.Redirect("http://www.somewhere.com"); I pretty sure that ...
3
votes
2answers
1k views

How do I handle concurrency problems related to event receivers?

This is a problem that seems to pop up all the time, so I'm wondering if there is an authoritative answer somewhere. I'm using an event receiver (specifically, the ItemUpdated receiverthrough the ...
0
votes
2answers
5k views

How to move an item from custom list root location to sub folder programmatically?

How to move an item from custom list root location to sub folder programmatically (in Event Receiver (ItemAdded))?
0
votes
1answer
1k views

creating event handler feature - OnDeleting

I'm trying to create a sandboxed event handler feature to handle the OnDeleting event of a task list in SharePoint 2010. I followed Microsoft's instructions. When I deploy the event receiver from ...
3
votes
1answer
4k views

How to disable event firing outside an event?

How do I disable event firing in code that is not part of an ItemReceiver? E.g.: I have an FeatureActivated event receiver which update a list (adds column) and updates all items to populate the new ...
0
votes
2answers
415 views

Static members in SPItemEventReceiver Class

I have a class: public class MyEvents : SPItemEventReceiver And a static member in it: public static int i; I need to transfer data from ItemDeliting event handler to ItemDeleted. I'm going to ...
13
votes
1answer
667 views

Memory leak in Microsoft.Sharepoint.Taxonomy.TaxonomyItemEventReceivers?

I've been trying to locate some memory leaks we've noticed in our ULS (EventID: nask, An SPRequest object was not disposed ... etc). On my dev environment, and at least 2 other cleaner installs, the ...
0
votes
3answers
302 views

How To attach an Event Reciever to a Specific List in SP2007

I'm having trouble binding my event receiver (ItemAdding) event to a specific list. I created a Feature Receiver and tried both the GUID and Name. But, I have another list that uses the same column ...
0
votes
3answers
1k views

Kicking off a workflow with an event handler on an anonymously submitted list item

I have a form that allows anonymous users to submit parking requests. I have an approval workflow set up but it won't start because anonymous users don't have permission to do so. Would an event ...
1
vote
2answers
876 views

FeatureInstalled event receiver acessubg spweb

I am trying to add a propertie to a WebAplication on FeatureInstalled event receiver. public override void FeatureInstalled(SPFeatureReceiverProperties properties) { ...
1
vote
4answers
2k views

How do I start a workflow automatically when a Contributor attempts to delete an item?

Contributors have the Delete privilege. In libraries and lists with Content Approval switched on, our policy is: Contributors may not delete draft items submitted by other users. Contributors may ...
8
votes
1answer
3k views

Which process do event receivers run under?

Some MSDN articles say that synchronous event receivers run under w3wp.exe, and asynchronous event receivers run under owstimer.exe. For eg, this one: ...
13
votes
8answers
4k views

Content Type Event Receivers Impossible to Remove

I have a very odd situation in my SharePoint staging environment. We recently stood up a new SharePoint 2010 server (single WFE + a DB server), and attached a backed-up content database from our ...
4
votes
1answer
5k views

How to get a field value of the item in ItemDeleted event handler?

I need to get the value of ListItem field in ItemDeleted event handler. Only value of one numeric field. But properties.ListItem == null. And AfterProperties, BeforeProperties also do not work. Is ...
0
votes
2answers
195 views

Switch off web part's events

I'm brand new to Sharepoint. How can I switch off web part's events like click and mouseover over title?
5
votes
2answers
2k views

SystemUpdate(false) using SPWeb.ProcessBatchData()

Is it possible to use SPWeb.ProcessBatchData() and not trigger all the event handlers attached to a list? I would like to process a large list in quick time, but I don't want all the event handlers ...
2
votes
3answers
859 views

Sharepoint site throws exception on clicking save button after uploading a file

I have deployed an event reciever with item added event on a document library in sharepoint site. In item added event I am calculating the number of pages for the uploaded document and updated a ...
2
votes
2answers
678 views

Sharepoint development without Visual Studio on server machine

Till now I was doing Sharepoint development with Sharepoint server and Visual Studio on same machine. Now there is a Sharepoint 2010 installed on my client machine with no Visual Studio installed. I ...
1
vote
2answers
465 views

OnQuickLaunch property in ListAdded

For an event receiver, I want to execute some custom code when a list is added to my site. I want to use the OnQuickLaunch property of the list, but that doesn't seem to correspond to the "show on ...
7
votes
1answer
915 views

Where to load data in the lifecycle of custom webpart

I have a webpart where I access a sharepoint list and render contents of that list. At the moment I'm fetching the data in CreateChildControls(). When a button is clicked the data will be fetched ...
2
votes
1answer
3k views

Event receiver After Properties Item Updating Date field is one day off

Experts, Can anyone explain me why I am getting 1 day less From a Date Only picker in Item updating event receiver ... this happens for After properties value. Basically I am trying to validate ...
0
votes
2answers
84 views

Spsecurity. RunWithElevated Privileges not working

This Code is working very fine with admin rights but when i tried using it with normal user didnt work. I have also provided user full control on the virtual directory folder. public override void ...
1
vote
2answers
752 views

Stop SPFieldMultiLineText from updating when not changed

I have a list with the requirement to keep a history of a frequently updated multi-line status. Additional requirements are to not show history on New and Edit forms and Views, but to show the ...
10
votes
2answers
917 views

What happens if an earlier Event Receiver throws an error?

Let's say I set up an ItemAdded event receiver with a sequence number of 12345. On this list there're two other event receivers that run before it; one for ItemAdding, and an earlier one for ...
2
votes
1answer
246 views

createsite event handler in sharepoint online

I am writing an event handler that will create a new site whenever the new item is added to the list. My issue is it creates a new site everytime but it does and does not (randomly) execute the code ...
2
votes
1answer
215 views

How to update content of file using event recievers

I have created an event reciever for SharePoint Server 2010 with added and updated events. The work is being done whenever a doc file is added to my library, it generates a copy of that file in pdf ...
2
votes
2answers
147 views

Creation of a “Attend” button under each Event

I would like to ask if somebody could advise me how to create an "Attend" button in the Event form which appears when clicking on an Event. The goal is that there is a list of participants visible ...
5
votes
2answers
299 views

How to add style library event receivers?

how can I add an event receiver to the style library ? (can't find any templateid) thank you ;)
1
vote
2answers
1k views

Cannot hit breakpoint for document library event receiver

Solution follows, I solved this problem: Good thing I figured out the issue after I've now wasted at least 6 hours debugging this issue. Turns out there's no VS bug, the only bug is that I am an ...
4
votes
1answer
539 views

In a document library itemUpdated event receiver, how to tell if a file was just modified?

How do I know if it is the file being updated? Since it could just be the item properties. Thank you.
7
votes
2answers
2k views

Preventing document Uploading to Document Library in SharePoint 2010

Here is my scenario. I would like to allow the only certain file types (doc,docx,pdf,ppt,pptx) into my document library. I wrote an ItemAdding event receiver for a document library as follows. But I ...
2
votes
1answer
124 views

is the WebProvisioned event fired when using restore-spsite?

Can somebody confirm that the WebProvisioned event is not fired when using restore-spsite? I have made some tests and it looks like it's not the case but I would like to make sure. If it's not the ...
0
votes
1answer
531 views

Get the inserted values from inside a ItemAdding event

Is it possible to get the values that were inserted (to create an item in a list) from inside the ItemAdding event? For ItemAdded the data is available in properties.ListItem, but for ItemAdding this ...
6
votes
3answers
4k views

Deploying EventReceiver project with target of WebApplication from VS fails when activating features

I am trying to deploy an event receivers project with a deployment target of WebApplication as part of my web parts package (also has a target of WebApplication) through Visual Studio and encountering ...
1
vote
1answer
81 views

Sharepoint Foundation 2010 events

I have an installation of sharepoint foundation. I was wondering if I can catch the event where a folder is created in a document library to do some more actions in sharepoint foundation. Can I follow ...
0
votes
2answers
2k views

Error when using ItemAdded event handler to update columns on newly uploaded document

I have an ItemAdded event handler connected to a document library, in order to automatically populate certain fields when a new document is uploaded: public class AutoPopulateDocumentFields : ...
1
vote
0answers
318 views

Document library event receiver when creating documents

I created an event receiver that processes some information in docx files when uploaded to the library. I do this in ItemAdded event. Everything works fine when the file is uploaded. When the files ...
3
votes
1answer
853 views

ItemAdding event on list item to target a specific custom list

I have an ItemAdding event handler created and targeted to a Custom List. The event receiver seems to be firing on all custom list on the site. I wonder if I should target it to a specific custom ...
4
votes
4answers
3k views

SPItemEventReceiver ItemAdding - Differentiate between a file and a folder

I've setup a custom event receiver. The purpose of my event receiver is to stop people from uploading any file type except PDF's. Right now my code looks like this: if ...
1
vote
2answers
719 views

SharePoint 404 not found when canceling an item event

I have a SharePoint 2007 list with an event receiver, its logic is very simple: public override void ItemDeleting(SPItemEventProperties properties) { //Base event ...
2
votes
2answers
569 views

Modifying a document when uploaded

I am modifying Word and PDF documents when they are uploaded to a document library with an event receiver. ItemAdded runs perfect without any errors, I manipulate the documents and save them to ...
0
votes
2answers
630 views

Unable to use SPEmailEventReceiver

I'm attempting to create a SPEmailEventReciever on an Email enabled library...The problem is that intellisense is not showing that class for me, so I am unable to inherit from it. MSDN shows it in ...
6
votes
1answer
1k views

Adding a list item with PowerShell doesn't trigger event receiver

I have a simple list with an event receiver for the following events: ItemAdded ItemUpdating ItemDeleting I confirmed that the event receiver fires when adding/updating/deleting an item from the ...