Questions tagged [event-receiver]
140 questions
1
vote
1 answer
How should I organize SharePoint Event Receivers in Visual Studio?
We have several custom lists, each of which has several event receivers associated with it (although only a couple have actually been written as of now). This event receivers handle a mish-mash of individual events and perform various bits of…

Nick Lewis
- 4,150
- 1
- 21
- 22
1
vote
1 answer
sharepoint 2013 itemupdated with argumentOutOfRangeException
I'm facing an issue with sharepoint 2013 and an event receiver itemupdated. In this event, i move item to an other library with
properties.ListItem.File.MoveTo(Url + "/" + properties.ListItem.File.Name);
I try too with this at begining but without…

user1898765
- 323
- 1
- 6
- 18
1
vote
1 answer
C# SharePoint 2013 Event Receiver Deployment
I set up a development environment with Visual Studio based on Server 2012, running SharePoint 2013. My project is an event receiver that I'm using to log fileAdded and other events. I'm able to run, test and debug everything just fine.
My…

Joe
- 163
- 2
- 13
1
vote
2 answers
Sharepoint item updating event - cancel event back to editform page?
I have an event receiver for a content type to validate some data in the ItemUpdating event. If I cancel the event (some of the data isn't valid for example), I set the properties cancel to true:
properties.Cancel = true;
properties.ErrorMessage =…

marcus.greasly
- 703
- 4
- 15
1
vote
2 answers
SharePoint Custom Upload Page Using Custom Field Types
Is it possible in SharePoint to create a custom upload page that combines the file upload control with custom field types so that a user can select a file to upload from their hard drive, enter a title for the file, optionally add comments, specify…

Ami Schreiber
- 287
- 2
- 6
- 20
1
vote
2 answers
How to retrieve list item attachments with SharePoint 2013 Event Receiver in correct order
I've created a Standard SharePoint 2013 Event Receiver on a custom list.
Watched Event = "ItemAdded".
Later in my code I need to retrieve the attachments of the list item in the same order as the user inserted them. But unfortunately it seems that…

Simon
- 377
- 2
- 11
- 30
1
vote
2 answers
Get SharePoint ListItem's After and Before properties in Event Receiver
So I'm trying to accomplish this kind of functionality on my SharePoint 2010 list:
I have a field of type choice in my list, which has 7 values and i want users not to be able to change the value of that field from values 2,3,4,5,6,7 to value…

Gintas K
- 1,438
- 3
- 18
- 38
1
vote
2 answers
[SharePoint 2010]Value from a User Profile custom field returns Null
In an EventReceiver I call this method GetPernNr on Item Added:
public override void ItemAdded(SPItemEventProperties properties)
{
SPSite site = properties.Web.Site;
using (SPWeb currentWeb = site.OpenWeb(properties.Web.ID))
…

Fulga
- 25
- 6
1
vote
1 answer
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 ItemAdding(SPItemEventProperties properties)
{
try
{
…

Mohemmad K
- 809
- 7
- 33
- 74
1
vote
1 answer
Sharepoint 2010 event receiver and workflow not starting
I created an event receiver that should trigger a SharePoint designer workflow, however this never happens. This part of the code never evaluates to true for the guid and workflow association: if (association.BaseId == workflowGuid). I am a bit…

user2544365
- 11
- 3
1
vote
0 answers
sharepiont 2010 sandboxed ItemUpdating event receiver triggered only on first 3 items
I have 2 Lists:
List A
Title
Category (lookup to Category List) (choices A, B C)
Price (number field)
Category Total (number field)
...Some other fields
List B
Title
CategoryA Price (number field)
CategoryB Price (number Field)
CategoryC Price…

Peter Soxx
- 11
- 2
1
vote
1 answer
How to create event receivers programmatically?
We are creating content databases, site collections and libraries programmatically. Then we are uploading documents in document library. We want to create event receivers programmatically in C# (without using Visual Studio) as soon as list is…

Shailesh Jaiswal
- 3,606
- 13
- 73
- 124
1
vote
1 answer
Overriding EmailRecieved without loosing the Base EmailRecieved functionality
I have a document library setup to recieve emails. The emails coming in have a single picture and a csv file which I use for some processing.
The override emailrecieved works perfectly but of course as I override I lose the nice SharePoint…

GeorgeK
- 637
- 1
- 8
- 18
1
vote
0 answers
Item Updating And Item Updated Event-Reciever Field values gets null for InfoPath Form Library
I have a InfoPath form library and custom visual studio workflow associated with it. And also I have a Event-Receiver for the library. When I Update the list item as Following code part the item Updating event of the Event-Receiver is…

SPKan
- 555
- 2
- 12
- 26
1
vote
2 answers
Sharepoint event receiver and linq to sharepoint
I have a sandboxed solution and access some lists with Linq-to-Sharepoint. Now I attached an event receiver to the list type 101 because I have to restrict some files uploaded to picture libraries. This works fine.
But now my Linq-to-Sharepoint…

Marc
- 6,749
- 9
- 47
- 78