12
votes
Accepted
Get selected value of dropdown choice list item
The only way I could get the selected value of a dropdown choice column was with the following:
SPFieldChoice dropdown = item.Fields.GetFieldByInternalName("AdminGuide") as SPFieldChoice;
string ...
10
votes
Accepted
SP2013 Event Receiver action open page library\list
As a short answer, There is no Event Receiver type that will trigger when opening a Library/ List Page!!!
The Event receiver should be used to trigger a specific action before or after a specific ...
8
votes
Accepted
Is it possible to wait until my file is uploaded in document library?
As far as I understand your question, i think there is problem when your are uploading file through a mapped drive. If you copy & paste a file over windows explorer (WebDAV) to the Library the ...
8
votes
Accepted
Add-SPSolution Error An object in the SharePoint administrative framework, "SPSolutionLanguagePack Name=0
I think This is especially the case if you have just done a retract/uninstall and you try to add straight away. If you try again in a few seconds it will work. Basically this is because when you ...
8
votes
Accepted
When to use Server side event receivers Versus using Remote event receivers?
Answering your 4 questions:
Differences
Remote Event Receiver (RER) -
A provider hosted app is must, which means you need additional infra. Apparently, as pointed out by Mihail-Florin Popa, it is ...
7
votes
Accepted
Why is my app's UninstallingEventEndpoint never invoked during app removal?
I faced the similar issue. In my case, I went to Site Settings -> Recycle Bin removed the app from there and then went to second stage recycle bin and deleted from there as well. After that, the ...
7
votes
Accepted
Specify ListUrl for Event receiver
Deploy your feature to Web Scope and enable the feature on your subsite.
Register the event receiver (element.xml) with:
<Receivers ListUrl="Lists/test">
7
votes
Accepted
Deploy/bind event receivers to lists in single feature
Your plan is good, and respects good practices (at least the practices I've been following for ages).
Your approach is to:
Create the solution in VS
Create one feature (scope: Web)
Create two ...
6
votes
Do event receivers fire when list items are added or updated using REST or CSOM
Yes event receiver do get fired if item is updated from client object model code. This is how I tested it. Created a custom list and added a text column named "Quantity" to it. Then created a ...
6
votes
Accepted
User of this.EventFiringEnabled statement in Event Receivers
The purpose is to hinder an update on an item from triggering event receivers again.
It was added as a way to help developers handle the "infinite loop" of update events that would otherwise be ...
6
votes
Accepted
ItemAdded event in Event Receiver
If your event receiver's feature scope is set to "Site", then the "ListUrl" and the "ListTemplateId" will be ignored, and your event receiver will fire on all lists.
Now in your case, Whenever task ...
6
votes
EnsureUser() will return the following error "The specified user could not be found. "
Can you check if the user's are still enabled in AD?
This error can be occurred as if the user is not enabled in AD, though it will still show as an SP User.
Please let me know what happens.
5
votes
Handling ItemUpdating event receiver firing more than once
public override void ItemUpdating(SPItemEventProperties properties)
{
try
{
//is the item checked out?
if (isCheckin(properties) == false)
{
this.EventFiringEnabled = false;
...
5
votes
When to use Server side event receivers Versus using Remote event receivers?
At first,
Remote event receivers are mainly introduced for cloud or office 365 environment (SharePoint Online) where the core logic will run in an hosted environment outside of SharePoint Sites and ...
5
votes
Accepted
Unable to Debug Event Receiver
Try to do the following to hit your breakpoint
Retract your solution.
Perform IISRESET.
Deploy it again.
Set your breakpoint and make sure it's not disabled.
Open SharePoint Portal.
Attached Visual ...
5
votes
Accepted
properties.ListItem.Url inside an event receiver is working well for discussion board items, while it fails for custom list (url will end with _.000 )
I never use the SPListItem.Url property, as list items don't really have a user browsable URL. They only have an ID, and the list that contains them has a display form (list forms may also change over ...
4
votes
Accepted
Create subsite in another site collection using event recievers
Using a pure Sandboxed solution this is not possible. A sandboxed solution has absolutely no access outside the current site collection, that's the whole point of sandboxed solutions.
On-premises
If ...
4
votes
Accepted
Handling ItemUpdating event receiver firing more than once
For the scenario when you are the one triggering the second ItemUpdating by changing item values you can use the EventFiringEnabled parameter (you should use a try - catch -finally around it):
this....
4
votes
Best practice for autonumber
Using an event receiver: You can check the last added item, then increment it with 1. Then modify the number as 2014/001, 2014/002 and ect... No need to have workflows.
Another way is having a ...
4
votes
which one is better considering performance, workflow or event receiver?
Depends on how your requirements fit in
1. Event handlers Can't be manually initiated - workflows can be initiated either automatically or manually.
Event Handlers can be Synchronous or Asynchronous ...
4
votes
Accepted
Event Receiver How to change account of Firing Event Receiver
You can impersonate in the event receiver. Usually, running code under System User is required and it is done using throuth RunWithElevatedPrivileges method, like:
Guid siteGuid = properties.SiteId;
...
4
votes
Accepted
Programmatically create a ContentDatabase C# SP2013
It happens from time to time, in the server OM, there's a check against the context (Web or not) so some operations are forbidden even if the identity running the code has the correct permissions.
...
4
votes
Accepted
Find out user who deleted an item in SharePoint 2013 Document Library or List
First, look in the site's Recycle Bin. If it truly was a delete, it should be there (be sure to use a site collection admin account to check).
Next, look in the Site Collection Recycle Bin. Items ...
4
votes
Accepted
Event Receiver to add value in field automatically in sharepoint list
public virtual void ItemUpdated(SPItemEventProperties properties)
{
properties.ListItem["Status"] = True;
properties.ListItem.Update();
}
Try this code
4
votes
Event Receiver to add value in field automatically in sharepoint list
public override void ItemAdded(SPItemEventProperties properties)
{
SPListItem oItem = properties.ListItem;
oItem["Status"] = true;
oItem.Update();
}
referenced: Click here
4
votes
SPWeb.Exists returns true for web don't exists
I think you're running in the OpenWeb() danger when you're not passing in an argument to the method. It is probally opening the RootWeb of your sitecollection which still exists.
You need to pass in ...
4
votes
Accepted
SharePoint Item Changed or Event Receiver
This totally depends on your requirement. Please refer following points this will be helpful for your decision.
If you need the ability to cancel the process, you should use Event Receiver. It is not ...
4
votes
Accepted
Difference between Using the Object Model vs. Using Solutions while creating event receiver solution for SP2010
To understand this in simple terms.
object model
Here you are creating a class library which has event receiver code.
After development you copy the dll to each sever in the farm and install it into ...
4
votes
Difference between Using the Object Model vs. Using Solutions while creating event receiver solution for SP2010
I think that the terminology here is a bit confusing. The article you linked to describes two ways of deploying managed code - either manually, or through a solution. But I think calling the manual ...
4
votes
Accepted
Alternative to using (Event Receivers & Server-side object model) when working with Office 365 sharepoint
You have two options for this type of event handling when developing for SharePoint Online: Remote Events Receivers and WebHooks.
Remote Event Receivers are similar to Server-Side Event Receivers but ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
event-receivers × 8862013 × 141
development × 137
2010 × 96
sharepoint-enterprise × 81
document-library × 75
sharepoint-server × 63
event-handlers × 59
list × 48
sharepoint-online × 41
sharepoint-foundation × 40
workflow × 39
visual-studio × 39
farm-solution × 33
splistitem × 27
content-type × 24
sandbox-solution × 21
itemupdated × 21
custom-list × 20
feature × 19
permissions × 18
remote-event-receiver × 18
2007 × 17
sharepoint-designer × 16
events × 16