0
votes
2answers
33 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
473 views

Get selected value of dropdown choice list item

I'm trying to get the selected value of a dropdown list item. Nothing works. SPFieldChoice dropdown = list.Fields["Admin Guide"] as SPFieldChoice; var choices = dropdown.Choices; var selection = ...
1
vote
2answers
80 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" ...
0
votes
1answer
159 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 ...
0
votes
1answer
68 views

Coding best practice display name vs internal name in itemUpdated event receiver

In an itemupdated event receiver, when referring to list fields, is it better to use the field's internal name, or its display name? Is there a clear guideline or best practice, or is this a ...
1
vote
2answers
341 views

Library event receiver - Object reference not set to an instance of an object

Yesterday I asked, where custom columns can come from. You helped me and told me that maybe it's event receiver. I created new event receiver and I added that try catch part: (Of course I change ...
0
votes
1answer
20 views

Download image from Imagelibrary

I have an event receiver that should download images from an imagelibrary, and do some stuff with that copy. There will be several images with the same customid that i want to grab, so I loop over all ...
0
votes
1answer
64 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
1answer
45 views

What would be the best approach for assigning permission for the document in library?

I working on a requirement in which there are contributor list for each document in sharepoint library. The contributor may be unique set of users for each document. I wanted to know what would be the ...
1
vote
2answers
147 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
1answer
489 views

Unable to get event receiver to work with Document Library

I have created a Document Library named Attachments Library. In the library I have created an additional mandatory column of File Details. I intened to use this field to capture some metadata about ...
1
vote
0answers
56 views

Can I access the Sharepoint 2013 event model without enabling application sideloading?

Note: originally posted on stackoverflow, just registered here. My goal is to initiate some custom processing external to our Sharepoint 2013 installation when a document is added to a specific ...
0
votes
0answers
62 views

Event Receiver issue with updating Splistitem fields only when i save as a document from Office Word?

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 ...
0
votes
1answer
127 views

Set lookupfield value on document upload through event receiver

I have a custom list, where when I create a new item, I assign a custom id to that element through an event receiver. After the item is created, I create a file that I upload to a document library. ...
2
votes
2answers
2k views

Event Receiver, Before and After properties

In an event receiver, Item Was Updated. I want to Compare the Moderation status on ListItems to perform some functionality.This is just some of the code. SPList list = web.Lists["DocLib"]; SPListItem ...
0
votes
3answers
1k views

How to redirect to another page using an event receiver?

I want to redirect to another page after an item is added to the list. I have referred many links and found the same alternative that is SPUtility.Redirect("https://www.google.co.in/", ...
2
votes
1answer
467 views

SPContext.Current.FormContext.OnSaveHandler Not Firing from Custom Field Type Control

I am having the exact same problem described here. Unfortunately because I don't have 50 points yet I can't comment on it so I have to create a new duplicate question. I mean it's not "100% EXACTLY" ...
0
votes
1answer
3k views

SharePoint 2013 Event Receiver on Custom List Definition not firing

There is custom list definition and I have attached an event receiver on ItemUpdating of list instances from the custom list definition. For some reason, the Event Receiver doesn't seem to fire at ...
2
votes
1answer
519 views

Why Item Updated and Item Added trigger together when we add a item to list (document library)

I have gone through hundred of articles over months but never understood as what could be the reason Item Updated and Item Added trigger together when we upload a item, even though if you try ...
1
vote
1answer
295 views

Possible to attach an event receiver to the list of user alerts?

There's seemingly loads of ways of overriding the OOTB e-mail notifications for creation and deletion of user alerts - can't you just attach an event receiver to the alerts 'list' (is it an SPList?) ...
6
votes
1answer
1k views

SPListItem.SystemUpdate(false) is still triggering alerts

Environment: SP2010 Enterprise, VS2012, c#, full server access Simple question... I'm using a console app to create sub-folders in a document library based on user input, then calling ...
1
vote
1answer
743 views

Event manager error after upgrading my WSP via Update-SPSolution

So I just deployed this .wsp to production and I've identified a tiny bit of logic that needs tweaking in an event receiver. I'm considering compiling a new .wsp package, and then running an ...
0
votes
1answer
671 views

Detected use of SPRequest for previously closed SPWeb object

I've got an event receiver that fails, seemingly inconsistently. I've checked the ULS logs and I can see the 90hv Detected use of SPRequest for previously closed SPWeb object. Please close SPWeb ...
0
votes
2answers
180 views

Can we find out in Event Receiver group Users like in a CS file

In CS file I used this code and it's worked: SPWeb site = SPContext.Current.Web; int managerGroup = site.Groups["Właściciele witryny Main"].ID; if ...
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 ...
1
vote
1answer
147 views

InfoPath, and Calling a instation of Template InfoPath from Event Receiver

I want to call a form of InfoPath from Event Receiver. How Could I set a field infopath a Values, from Event Receivers to sets a Values on infopath fields which could I Validate and show or hide a ...
0
votes
1answer
46 views

Connecting infopath with the data from the list

When I creating a infopath conected with list in creator from Microsoft InfoPath Designer the bookmark which called developer is hinding, and I can't editing or writing any of code. How could I ...
0
votes
1answer
90 views

How Could I edit InfoPath in Visual Studio

If I add infoPath from Infopath Designer its blocked me all the Modal Dialog fired from Event Receiver. I want to edit InfoPath form to don't block My Sharepoint Modal Dialog. Now no one dialog boxed ...
0
votes
1answer
270 views

Sharepoint modal popup don't shown when the Infopath form are on the site

I tried to add Infopath form on my project, but when I add the Infopath form some of PopUp which are corelated with Infopath and shows errors od data didn't shown What should I do to shown A Modal ...
0
votes
1answer
95 views

Adding EventReceiver to Dynamic List

I am trying to add a Event Receiver to a list that is dynamically created (by code). So i cannot add a event receiver on the list directly. I found a way to attach a Event Receiver to the list by ...
1
vote
1answer
40 views

An event to be fired on editing a file

As title says, I need an event to fire when a listitems file has been edited. I appreciate this isn't as simple as it having it's own event, which is why I've tried to make use of the itemupdating ...
2
votes
2answers
1k views

Best way of getting SPWeb in Event Receiver [Best Practices]

what would be the best way of getting SPWeb and List in context below, specially when list title can be different for different cultural websites, private bool ...
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
377 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
230 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. ...
0
votes
1answer
27 views

Is it posible to create a EventReceiver for opening a site?

I want to start an EventReceiver when a site or a list opens. How can I do this? Is this possible?
0
votes
1answer
2k views

Event Receiver Item adding - How to get a user name?

At Event Receiver Item Adding I must add name of worker which is adding a items to the list. Here is my code: SPListItem item = lstOtherList.Items.Add(); item["Kontrakt"] = ...
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 ...
1
vote
1answer
104 views

Access exceptions when trying to add a content type to list

In the following method, 'list' is simply an SPList ("Documents"). I'm attempting to add ContentTypes to the list and then update it. This code is found in the FeatureActivated event of an event ...
1
vote
2answers
158 views

Is there anyway I can find out if user uploaded multiple items in ItemAdded Event

I have a "ItemAdded" event, I want to check Number of documents uploaded if a user uses "Upload Multiple Documents" for uploading. Normally what happens is when a user adds a item they are taken to ...
0
votes
1answer
28 views

Possible to get a list of scheduleditems?

Is it possible to get a list of ScheduledItems from SharePoint in C# (event receiver)? For example, I've created a ScheduledItem and called the .Schedule() method. I'd expect this ScheduledItem to ...
0
votes
1answer
1k views

Event receiver for a custom List

I created a custom Event Receiver using WSP builder, and in elements.xml file i have given the ID of list which i find in elements.xml of List definition of particular list. I also activated the ...
0
votes
1answer
181 views

Using an event receiver to validate a page

I need to evaluate certain properties of a page whenever it's being saved/published as part of a custom validation I need to implement. I notice properties has both Cancel and ErrorMessage properties ...
6
votes
4answers
18k 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 ...
1
vote
1answer
1k views

EventReciever to change permissions

I am trying to create an event reciever on a document library that on creation it removes all permissions and gives the author contribute writes. All other users get nothing. I have the following ...
1
vote
1answer
124 views

How to push a specific SPListItem through a workflow with code?

I would like to push a specific SPListItem to the final step in a State workflow, skipping all the intermediate steps (if a certain checkbox is checked). Currently, I have an event receiver hooked ...
0
votes
2answers
67 views

Cyclic calling of event receivers

I have a Deleting Event Receiver, say, on list A. Also I have other Deleting Event Receiver on list B. There is a deleting method in both receivers, which deletes items of each other. So, when an item ...
4
votes
3answers
3k views

How to add event receivers to all the lists in a site collection?

What is the best practice around adding event receivers across all the lists in a Site Collection?
7
votes
1answer
679 views

Client Object Model SystemUpdate

I need to have the SystemUpdate functionality from the Client Object Model. Is there any way I can do it since the ListItem.SystemUpdate() does not exist? Another solution would be to disable the ...
2
votes
2answers
643 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 ...