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.
- DeletedOct 18, 2016
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, 2016Have you considered to use a Timer Job instead of an Event Receiver?
- DeletedOct 18, 2016
We have thought about that but would prefer that we do this upon file creation in the library. We may have to resort to this.