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
6
votes
1answer
420 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
2k 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
68 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
384 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 ...
9
votes
2answers
695 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
192 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 ...
0
votes
0answers
102 views
How update a value of custom field when the list is view or load in sharepoint 2007 services 3.0 [closed]
I have a problem,
I use sharepoint 2007 services 3.0
I wanna build a custom field, the value of this field come from a query in external database.
then when the list is view i need update the fields ...
2
votes
1answer
178 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
92 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
223 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
683 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 ...
3
votes
1answer
420 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.
6
votes
2answers
1k 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 ItemAdding event receiver for document library as follows. but i am ...
2
votes
1answer
111 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
414 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 ...
2
votes
3answers
2k 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
77 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
1answer
1k 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
180 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
625 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
2k 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
526 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
358 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
472 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 ...
5
votes
1answer
634 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 ...
1
vote
1answer
77 views
How to add XML file with event reciver
I am creating a event reciver for the list, for that i need to get some data from XML file. currently i have placed the xml file in my local system. Actually where do i need to add the xml file. Is ...
0
votes
1answer
341 views
Event receiver feature update
I am developing an event receiver in VS2010. To test the event receiver I deploy it to development using the functionality within VS 2010. This works without problems.
However my concerns start when ...
4
votes
4answers
651 views
Web Template - Receivers Not Firing
I have a custom web template used to provision site collections that activates features with onet.xml and is deployed as a farm solution. I've tried both feature receivers and event receivers (on ...
3
votes
1answer
790 views
Is there a way to enable and configure incoming email for a document library using the C# api for sharepoint 2010
I've got a requirement to allow users to approve or disapprove certain actions by replying to auto generated emails. I've already got a good handle on how to use email enabled lists and event ...
2
votes
1answer
742 views
Renaming a folder with event receiver
I need to rename a folder after it is created by a user. I am currently using an event receiver and try to rename the folder in ItemAdding without any success. In ItemAdding event the folder is not ...
1
vote
1answer
578 views
Event receiver (type documents) fires for almost everything, including new usergroups, new sites etc
I have created an event receiver with the "documents" as templateid (101).
<Receivers ListTemplateId ="101">
When I upload a document, the event gets fired. So no problem here. However the ...
0
votes
2answers
301 views
Custom Event Receiver - Copy To sub Folder
I need to copy my files from one document library to another document library which reside on another site and
Document library contains number folders and sub folders..
The same structure should be ...
0
votes
2answers
527 views
Problem renaming a file in document library programmatically
I want to use a FeatureEventReceiver to rename Home.aspx -> Old_Home.aspx. When i activate the feature rather than Home.aspx getting renamed it gets deleted/disappears (i.e. missing when i refresh ...
3
votes
1answer
90 views
Custom numbering scheme for document libraries
I need to create an event handler for a document library that will give custom Id's to documents and folders in it. The top folders will be prefixed with capital letters, folders and documents in ...
1
vote
2answers
767 views
How to trace the ListAdded event for the entire SharePoint 2010 farm?
In our SharePoint 2010 environment, we want to enforce the users to choose the option "show user names in the survey list" (survey list) however there may be a time when user may choose "No" to this ...
2
votes
1answer
876 views
What is the scope of DisableEventFiring()?
When I call DisableEventFiring() what events are blocked?
All events? On the current item? All events using the current EventReceiver? What happens if two threads change one item and one ...
5
votes
1answer
1k views
ItemUpdated event handler runs four times
I have a list in the rootweb, and a list in a subweb. I want to update/add when something changes in an item in the subweb. This method is invoked in an ItemUpdated event receiver. The problem is that ...
8
votes
4answers
404 views
Save metadata on this list as social tags
On the UI, for a document Library settings, under "Enterprise Metadata and Keywords Settings" there is an option to
"Save metadata on this list as social tags"
Is there a way to activate this, ...
0
votes
1answer
326 views
Custom Event Handler to handle Emails in Project Server
I am working on writing an event handler that handles the OnSending event of Project Server in 2010. I am very new to writing event handlers in MS Project and require your help in getting started on ...
1
vote
2answers
69 views
What is the recommended way of giving one Sharepoint user control over deletion of list items?
I have many (29) Sharepoint calendars, each with a separate owner. I would like to have anyone able to book an appointment in these calendars, but for deletion to be handled only by the calendar ...
1
vote
1answer
117 views
alternate access mappings and list event handlers
I have a tricky problem with list event handlers (item checking in).. I deployed a site level feature with itemcheckingin event for sharepoint 2010.
If I access the sharepoint site using the url's ...
8
votes
3answers
2k views
Event handler vs. event receiver
http://msdn.microsoft.com/en-us/library/ms453149.aspx says
To create the event handler
1. Start Microsoft Visual Studio 2010.
2. On the File menu, point to New, and then click Project.
3. In Project ...
1
vote
1answer
120 views
Best way to clean up production Site ListItem Versioning
I realized a minor flaw in my event receivers for a List with versioning enabled. I used the ListItem.Update() instead of ListItem.SystemUpdate(). In addition I did not use This.EventFire = false. ...
0
votes
2answers
118 views
On Check-in, how do I detect a new file
Right now I have a SPItemEventReceiver that overrides ItemCheckedIn. It checks out the file, creates/marks a hidden field, and checks it back in. The reason for setting a property on the file is to ...
1
vote
2answers
870 views
Move a document from one library to another library using event receiver
Suppose one document is uploaded to the Shared Document library, I need to move the document to an other library say List. There I have to create a folder with the document name and needs to place the ...
1
vote
1answer
94 views
Disable Web-scoped features on Web deletion
I have a SPWeb ( http://example.com/site ), created used a custom web template, with several features activated on its scope.
When I delete the SPWeb it would be desirable that all the features ...
1
vote
4answers
1k views
Problem with HTTP handler in Sharepoint 2010
I'm developing a visual web part for Sharepoint 2010. This webpart needs to get some data via AJAX. So I went for the HTTP handler + jQuery solution posted here.
But I'm getting a problem when trying ...
2
votes
6answers
3k views
How can I auto-increment a column?
I am working on a solution where I have a list with a column named LogIDNumber. For each new entry in the list, I would like to increment the LogIDNumber by one. I could use the ID generated by ...
1
vote
1answer
623 views
How to make jQuery AJAX request with a HTTP Handler in SP10?
I'm developing a SP 2010 Visual Web Part that needs to load some data via AJAX.
I found this very helpful article but I'm having some doubts about it.
I have the Visual Web Part project, inside I ...
1
vote
2answers
203 views
BCS Security Access Using Secure Store in code question
I have Secure Store and also Kerberos setup on my development and production farms. I am using Event Receivers to access BCS data. I have verified that if I simply impersonate a user that has access ...
