4
votes
1answer
41 views

Synchronous ItemAdded event. Do I need to explicitly call properties.Dispose()?

We have a SharePoint 2010 On-Prem solution. I have an ItemAdded event receiver which has been made synchronous using the Synchronization property. Now, when this event receiver fires, I have used the ...
0
votes
1answer
84 views

Save Conflict error While Saving

I have one sharepoint 2010 application, in which i have to add the item to the list followed by 2 more updates within the same list item. These are the items that I have to do while saving. I need ...
1
vote
1answer
36 views

List Item sending an email on ItemUpdated previous confirmation

I'm working on a Sharepoint 2010 List trying to send an email with a custom Even Receiver, on Item Updated. The List Item has to send an email when some fields are filled, other email when other ...
0
votes
2answers
34 views

How to detect when a new item version is added in an event receiver?

Is there a way to detect (in C#) if a new item version was added in either ItemAdded or ItemUpdated event? I would only like to execute some code when either new item is added, or a new version of the ...
1
vote
2answers
67 views

Event receiver firing even though user doesn't have permissions

Scenario: SharePoint 2010. A list is configured with this setting turned on: "Create items and edit items that were created by the user". Users can only edit or delete their own items; if they try ...
1
vote
2answers
88 views

ItemUpdated not firing when document is added to non-default document library

I have an item receiver that implements ItemUpdated() to process an item after it has been uploaded to a document library. Everything works fine if I add documents to the default "Shared Documents" ...
2
votes
1answer
35 views

Content type eventhandlers gets bound to list

I have a custom parent content-type on which I apply 6 event-handlers. I then have 24 content-types based off of the parent content-type - thus inheriting the 6 event-handlers. - All defined in XML I ...
0
votes
1answer
170 views

Task List ItemAdded Receiver doesn't work for workflow created tasks

Why doesn't the ItemAdded Receiver get called when a task was created by a workflow, but when a user created a task it does? I tried setting the Receivers ListUrl to my list URL and tried using the ...
0
votes
1answer
172 views

How to deploy ItemAdded event receiver to the entire farm? [duplicate]

I have created an ItemAdded event receiver that is supposed to process new documents/files after they've been added to any document library in the farm - i.e., I'd like the event receiver to ...
2
votes
1answer
117 views

Handling itemupdated calling itemupdating

I have a custom list (not document library) that i have attached 2 event receivers to. These are itemupdating and itemupdated. My itemupdating event receiver sets a value in a field and my ...
1
vote
2answers
215 views

Is it possible to, using an event receiver, change a filename before it is uploaded?

I was using a workflow to change file names to some text and the SP ID, but this has caused issues because the workflows can often take several minutes to complete. I would like to do this during ...
0
votes
1answer
65 views

How can I differentiate an user from a workflow while in an ItemUpdating Event

Is there a way to differentiate an user from a workflow while in an ItemUpdating Event? To show the my problem here's the ItemUpdating method: public override void ...
0
votes
0answers
27 views

Duplicate alerts

When I first built a 2010 document-housing site and tested alert functionality on it I found that when you set multiple daily alerts (one in the morning, noon and evening) on a document and a change ...
1
vote
2answers
149 views

How to retrieve email address from user ID?

I'm developing an Event Receiver in C# and I would like to retrieve the email address from a user ID. How can I do that? Thanks
0
votes
0answers
80 views

Event Receiver to intercept event modify with drag and drop

I've created my custom Event Receiver that works well and works on ItemAdding and ItemUpdating. But if an user try to modify a calendar event using drag 'n drop, I'm not able to intercept that ...
2
votes
1answer
165 views

Event Receiver on SharePoint 2010 - How to query DB and display an error message

I'm an absolute beginner of SharePoint development. I would like to create my first Event Receiver and I'm doing with VS2010 (because I'm on SP 2010). I would like to check if adding a new event in ...
0
votes
1answer
105 views

Sharepoint 2010 itemadded eventreceiver datetime parseexact fails (sometimes)

I have an event-receiver set up for sharepoint that runs a query against Oracle and then parses the returned date string. The SQL SELECT statement is built like this : TO_CHAR (TRUNC (dateinfo), ...
1
vote
0answers
38 views

UnitTest for SharePoint.EventListener with TaxonomyField

Recently, I tried to write a unit test for my new SharePoint project. The Project contains EventListener which checks a TaxonomyField in a special list, and fill it, if field is empty. Code looks ...
0
votes
0answers
23 views

Reassign an OOB WF Task via Code

We have a legacy WF that is running on SP 2010 system and I am attempting to add some new features to it without completely migrating it to a VS WF. I cannot seem to figure out how to reassign the ...
0
votes
1answer
503 views

Sharepoint 2010 | SPItemEventReceiver is not firing programatically

I have a SPItemEventReciever that works perfectly when I update a list item via the sharepoint web interface but does not fire when updated via the object model. The event reciever is deployed via a ...
0
votes
1answer
738 views

Event receiver not firing on item added via email

I have a list that have been configure to receive incoming email. I also create event receiver for that list (on itemAdded and on itemAdding). The problem is, my event receiver not executed when ...
4
votes
4answers
841 views

Event Receiver called multiple times

I attached an event handler for ItemAdded to a content type A in the xml (using XmlDocuments). I have 4 other content types A1, A2, A3 and A4 that inherit from content type A (in their xml definition ...
0
votes
1answer
95 views

Access Denied when using CancelWithRedirectURL

I'm trying to prevent some records from being deleted from a list. I've got the ItemDeleting event firing and everything works great. I can prevent the item from being deleted just fine. The ...
0
votes
1answer
424 views

How to disable event receiver in feature deactivated?

I am new SharePoint programming. I have created event receiver on item adding for the document library that allows only .doc files to be uploaded, otherwise it gives error. My code for event ...
0
votes
3answers
528 views

Unable to redirect from sharepoint event receiver

I have created an event receiver on the "Task" list. If the "Due Date" is null then the user should be redirected to the custom error page. Custom error page resides in the SharePoint mapped folder ...
0
votes
0answers
269 views

How to Retrieve List Item Using It's Field Name? - SharePoint

I have two contact lists in my site i.e. Contacts 1 and Contacts 2. I am creating "item added" event receiver on Contacts 1 that is whenever new entry is made to the Contacts 1 automatically it ...
0
votes
2answers
105 views

SharePoint rename file on overwrite

I have a simple requirement, yet it seems very complex to implement. When users upload a file to the document library, I want to check if it exists. If it exists I need to rename the file by appending ...
0
votes
2answers
2k views

Custom Error Message for Event Receiver in SharePoint 2010

I want users to upload the .doc files only in the document library. To do so, I have developed an event receiver in Visual Studio 2010. My code is as follows: public override void ...
0
votes
1answer
161 views

Programatically populate custom list column

I have a list definition project (schema.xml, etc.). I would like to create a computed column that's available for grouping, but not have the computed value from a CAML query, as it's going to be ...
1
vote
2answers
132 views

Re-attach Event Receiver to library

Using SP 2010, we created a content type with an event receiver bound to the content type. The ER is an ItemDeleting ER that prevents deletes from the library. When we create a library and attach the ...
1
vote
0answers
58 views

Exchange event receivers of lists

Recently i faced an interview question for which i am unable to find a suitable answer. I was given a scenarion to implement, which goes like this. There are two event receivers Ea and Eb, these are ...
0
votes
1answer
70 views

Remove entries from dbo.EventReceivers

Can I safely remove Entries in dbo.EventReceivers ? The Problem is that when i'm deploying a Solution i get on the Feature Activation many Errors in the SharePoint Logs like: ...
0
votes
1answer
339 views

EventReceivers not firing at all

I wrote some code to do some things before and after an item is added to some lists. The solution is sandboxed. I have checked and confirmed, through power shell, that the event receivers are bound ...
2
votes
1answer
330 views

Sharepoint 2010 hosted web service works in browser but not event receiver

I have written a RESTful web service that writes calendar events from Sharepoint to personal exchange calendars. The web service is hosted in sharepoint. When I make the call using javascript from the ...
1
vote
2answers
297 views

SPListItem.Delete or SPListItem.Recycle, which one was called?

In an ItemDeleting event receiver, is there a way to find out whether SPListItem.Delete or SPListItem.Recycle was called? I would like to write different things to my log here...
1
vote
2answers
115 views

ItemUpdated fires when no item is added

I have an ItemUpdated event receiver in a document library in SharePoint 2010. When I try to upload a document with a name that already exists in my library I get an error message "The specified name ...
1
vote
3answers
2k views

Implement check-in check-out on list items?

I want to implement check-in/check-out functionality on a list in sharepoint 2010. What I want is, when a person is updating a list item, no one else shuld be able to edit that particular item and ...
1
vote
1answer
717 views

Recurring Events in SharePoint 2010 - Incorrect “Duration”

Background: The company I work for has a regular SharePoint list with a custom ContentType (that does not inherit from a calendar list item) that it uses for Events. It then shows these using a ...
1
vote
1answer
292 views

Choice field event handler

I have a drop-down choice field in a custom list I'd like to add an event handler that fires when a value is selected from the drop down. I'd originally attached to the itemupdating event but ...
1
vote
0answers
66 views

Distinguish Event Receiver Firing From Web UI or From Code

Think of some event receiver methods like ItemAdded, ItemDeleted etc. How can I detect in my event receiver code if the item adding/deleting is being triggered from the web UI or from the object ...
0
votes
1answer
4k 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 ...
0
votes
1answer
77 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 ...
0
votes
1answer
379 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
237 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. ...
1
vote
1answer
130 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 ...
0
votes
1answer
694 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
214 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
3answers
489 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
1answer
293 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 ...
0
votes
2answers
530 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 ...