Forum Discussion
Default column value - Event Receiver
Hi Deleted,
Which version of SharePoint are you using? As you are talking about event receivers I'm assuming that you are using SharePoint on-premises.
I would be interested to see what the isues were with workflows.
Event handler will fire reliably however you should take into account some potential issues.
When change to items are made by the system account then you will find that neithr workflow nor event handlers will fire. Your system account is the account running the application pool of your SharePoint web application.
Also, when you are handling events you want to be careful. As long as you disable the event firing while you are dealing with the event then you should be ok for an event to fire only once.
Pieter,
Sorry about leaving off the version...we are using Sharepoint Online.
We had a workflow on a document library set up to address the lack of "Edit only your own" capability in libaries. Everyone had permission to add to the library but when someone added a document the workflow changed the permissions so that only the person who uploaded it could edit it. We encountered issues where the workflow would sometimes not start which was not a could scenario. We addressed this with MS support and they waived some magic fairy dust on our Tenant and the issue seems to have stopped. Unfortunately, my confidence in workflows is not the best.
We have used event receivers hosted in Azure and they seem to be more reliable but we have had scenarios where they have failed to fire as well but that mostly has to do with occasions where we upload documents in mass. We have to run a clean up job nightly that double checks for these cases.
It sure would be nice if we could just default the column within a DS like we can in a folder.
We are using
- Oct 18, 2016Why don't you set the column on the document set and then let the documents inside each document set inherit that column value from the document set.
- DeletedOct 18, 2016
I need folders within the document set and each folder needs the column set differently.
- Oct 18, 2016An in the future you could use the coming webhooks
- DeletedOct 18, 2016
Maybe...not really a fan of the expiration on those. Don't want to have to remember to go refresh functionality.
- Oct 18, 2016A Timer Job (A Web Job for instance) deployed to Azure could be executed each minute so it should be enough to have "almost a real time experience" when updating the metadata...if this option does not convince you, then the remote event receivers suggested is the way to go