2
votes
1answer
25 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
25 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
32 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
35 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
92 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
47 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
17 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
72 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
42 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
66 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
60 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
16 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
435 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
465 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
337 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
89 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
257 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
366 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
160 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
92 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
1k 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
0answers
14 views

What event(s) are called when sending a list item to another list?

When an item is moved or copied to another list, I need to take action using both the GUID of the old item and of the new. What events do I need to handle, and will I have access to both GUIDs?
0
votes
1answer
144 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
118 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
55 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
52 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
318 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
239 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
231 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
108 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
551 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
256 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
62 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
3k 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
66 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
298 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
178 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
120 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
601 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
194 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
421 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
264 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
433 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
849 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, ...
2
votes
1answer
2k views

ItemUpdating not saving field values

A user has a list that has a couple fields that are often updated. He wants to store the prior values in some other fields on the item when the item is updated (yes, I know versioning would be ...
2
votes
2answers
769 views

Dispose of SPItemEventProperties at the end of an event receiver?

Is there any need to call properties.Dispose(); at the end of an event receiver? Would this prevent memory leaks? Is this unnecessary? Is it best practice?
2
votes
1answer
365 views

Have External Lists And / Or Event Receivers?

I am fairly new to Sharepoint. I am in the early stages of developing a SP2010 LOB app that will finally have like 50 lists which are quite interrelated with each other. I am asking for your help ...
5
votes
5answers
14k views

Error occurred in deployment step 'Activate Features': <nativehr>0x80070002</nativehr><nativestack></nativestack>

I have a feature. On the FeatureActivated event I am creating a list if it is not there. I also have an EventReceiver that in the elements.xml on the Receivers node has the attribute ListUrl. This is ...