Questions tagged [eventreceiver]

48 questions
0
votes
2 answers

SharePoint itemDeleting evert is not working

I have a site in SharePoint and I want to custom delete from a list. So, I'm creating the public class ListItemEventReceiver : SPItemEventReceiver { public override void ItemDeleting(SPItemEventProperties properties) { if…
Jeff Norman
  • 1,014
  • 5
  • 25
  • 42
0
votes
1 answer

SPEventReceiver Updating SPDocumentLibrary

I my scenario I have an InfoPath form being updated in a document library. There is a field in the InfoPath form which can be edited by the user and needs to be used to set a "Title" field of the ListItem in the Document Library. I had expected…
0
votes
0 answers

Event Receiver - How to update fields from List A based on List B

I'm new to Event Receivers and I never have done one. Here is my situation, I have 2 lists. First list contains fields: Software Name, Quantity, Used, Available, and COUNT [Software Name: (Count Related)] from second list. Second list contains…
0
votes
1 answer

Event receiver takes a break

I have an event receiver that listens on three list. When I save Data, about 7 elements are changed, so the event receiver has to start 7 times. Inside the ULS-log I can see the event receiver does what he should, but between each of them there is a…
Ole Albers
  • 8,715
  • 10
  • 73
  • 166
0
votes
1 answer

Error registering SharePoint WebDeleting event receiver in some environments

I am trying to register a WebDeleting event receiver within SharePoint. This works fine in my development environment, but not in several staging environments. The error I get back is "Value does not fall within the expected range.". Here is the…
Kirk Liemohn
  • 7,733
  • 9
  • 46
  • 57
0
votes
1 answer

EventReceiver doesn't work correctly

I've got an EventReceiver in my SharePoint application where I'm overriding ItemAdding and ItemUpdating methods: public override void ItemAdding(SPItemEventProperties properties) { SPWeb web = properties.OpenWeb(); switch…
Enam
  • 1,268
  • 1
  • 9
  • 16
0
votes
1 answer

Sharepoint 2013- update document metadata using itemupdating or itemupdated event is not working

I am trying to update custom metadata for a document when document is added to the library using item updated event, but it is not working. A custom aspx application is using a href element to point to the URL of the document. Click it on it opens…
Tejal
  • 3
  • 2
0
votes
0 answers

sharepoint event handler data deleted when check in

I'm writing an eventHandler to auto add a string when a file is added to a doclib. public override void ItemAdding(SPItemEventProperties properties) { SPSite site = new SPSite("url"); SPWeb web = site.OpenWeb("myWebSite"); SPList list =…
0
votes
1 answer

Event Receiver issue with updating Splistitem fields

I have a problem with updating Splistitem fields only when i save as via Office Word a document to Sharepoint in my Event receiver. it's works when i add the document from Sharepoint. here is my Code : public override void…
souf
  • 11
  • 1
0
votes
1 answer

UnauthorizedAccessException exception in ItemAdded and Updated handler in event receiver

I have the SharePoint 2013 site collection called "site1" i have one list and one document library in that site collection, i written a event receiver to move the list item attachment into document library and after moving the list item attachment…
0
votes
2 answers

The security validation for this page is invalid error trying to add sharepoint approval workflow to List in ListAdded eventreceiver

What I am trying to do is to attach the OOTB sharepoint workflow [Approval Sharepoint - 2010] to each and every document library that ever gets created. To accomplish this I created a List Added event reciever and put this code in it - public…
vivek m
  • 117
  • 1
  • 2
  • 15
0
votes
1 answer

Sharepoint 2010 - Add group on deploy

in order to provide webparts and custom webtemplates for a site-collection, I need to create custom groups. I do that in the following way: using (SPSite site = properties.Feature.Parent as SPSite) { if (site != null) …
bash.d
  • 13,029
  • 3
  • 29
  • 42
0
votes
0 answers

WorkFlow start only after event receiver ItemUpdated finish

In workflow i need to send email with field which i update in event receiver ItemUpdated method but some times workflow finishes first and send empty email, sometimes it works fine. How to be sure that workflow start only after this item …
0
votes
2 answers

SP2010 Attach Event Receiver to specific list programmatically - runs for all lists

I'm attaching a event receiver to a single list (Web scope). But the ER runs for all lists in the Web. This question says that the feature, the ER is deployed in, have to be Web scope. This is the case. The Feature is activated programmatically…
PatrickP
  • 80
  • 2
  • 9
0
votes
1 answer

Calling Console Application (.exe) in Event Receiver and Getting Error

I am using SharePoint foundation. I have a console application that is used to run some OCR process. I am calling the exe of the console application from windows service and it is working fine. I am trying to call the same exe from an event receiver…
MAK
  • 129
  • 1
  • 8