Questions tagged [event-receivers]

Event Receivers are a piece of managed code that responds to SharePoint events when specific triggering actions occur on a SharePoint object.

Filter by
Sorted by
Tagged with
0
votes
1answer
45 views

powershell does not fire “System.Reflection.Assembly.Load” in the event receiver

There is a problem with Enable-SPFeature command in case of having an event receiver in the feature. Feature Activated event is not fired. If I enable the feature manually everything works well. So, ...
0
votes
2answers
90 views

Improving performance for the Create/Copy files and folders (using code) inside our large document library

We have a SharePoint 2013 on-premises team site and we have a document library which have around 29,000 +++ items, and those files are structured under around 4,000 folders and sub-folder. now inside ...
0
votes
2answers
34 views

Change the permission of all the files in a Document Set of a Document Library to Read-Only

I've got a document library and I want to change the permission of each file present in a particular document set (say Office Documents) to Read-Only when an item is Updated in a List (say List A). ...
0
votes
1answer
41 views

Updating List item from Event Receiver of another List

According to my requirement, I've 2 Lists within the same site List A and List B. Below are the columns in List A: User [PeoplePicker], City [dropdown (2 choices)], Company [dropdown (5 choices)], ...
0
votes
1answer
48 views

Accessing the items of other List through Event receiver of a List

I have two lists "List A" and "List B" List B has columns: Color [Single line of text] Description [Multiple lines of text] and now how can I get the "Color" and "Description" of the second Item ...
1
vote
0answers
18 views

How to move a file programmatically and preserve full version history (including users!)?

I have a document approval system that works something like this: User uploads a document to one library, fills out metadata. Approval process begins, workflows are fired to send out notification ...
0
votes
0answers
10 views

Event Receiver failed to add Items to the list with error The sandboxed code execution request was refused

I have an Event Receiver to Process an Excel file and Insert rows to another SharePoint List. I get following error when I add the item to the list. The sandboxed code execution request was ...
0
votes
1answer
34 views

The property or field 'ItemCount' has not been initialized. It has not been requested or the request has not been executed

I have the following code inside our server-side event receiver, the code should connect to a sharepoint online list and get the total number of items, here is the code:- try { currentItem[...
1
vote
1answer
13 views

SPSecurityEventReceiver - when user is added directly to the site

Thanks for your help. I am trying to implement a notification mechanism where in an email is sent to the site owner when a user is added. This works great with SPSecurityEventReceiver. However, the ...
0
votes
1answer
18 views

Get SPField real DisplayName in timer job

I wrote two event revicer. On base on Web scope - this frature creat page and shom on them all list field by their display name, user select interesting to him field and can they use in mail template. ...
0
votes
0answers
12 views

Library Item adding remote event receiver get file

In Library Item adding remote event receiver how can I get the file which is getting added but not yet added?
0
votes
0answers
23 views

Oracle connection with SharePoint list

I want to create Oracle connection with my SharePoint List, I am using an event receiver on a list item for CRUD Operations. using (OracleConnection conn = new OracleConnection(connectionstring)) { ...
0
votes
2answers
34 views

Updating document library column when document in checked out

I am working on one small project on SharePoint online(E3), requirement is as per below. Whenever any user check out the document, the document library column "isApproved" should be set to "No" one ...
1
vote
1answer
50 views

Item updated event receiver not firing when workflow updates the list item

I have an event receiver on an item updated event, when i manually update the list item, the event receiver is firing and calling the method, but when i update the list item through workflow step,when ...
0
votes
1answer
41 views

Trigger azure function on list created event - SharePoint Online

We want to trigger an azure function whenever a new list is created in any site collection in our tenant. So far, we have found webhooks limited to specific list only. In On-prem env, we can use ...
0
votes
2answers
116 views

Get item URL from SharePoint ItemAdding Event receiver

I have a sharepoint list with the folders option enabled. My goal is to save the items only inside the folders so that I could grant unique permissions on the folder rather than the item itself. In ...
1
vote
0answers
16 views

Send mail in list event receiver work only for site owners

I have simple event receiver start after save item, do something and send mail, there is part of code: SPSecurity.RunWithElevatedPrivileges(delegate () { MailMessage mailMessage = new MailMessage(); ...
1
vote
1answer
24 views

Deploying Event Reciever

I Know that event receiver should be deployed as a sandbox solution. But what if I deploy it as a farm solution. Is there any negative impact or not.
1
vote
1answer
16 views

Permission change event in SharePoint

I am working on one solution where, I need to track changes over permission for any documents under selected sites. If I do crawl to each document I will ofcourse will get the updated permission, but ...
1
vote
1answer
14 views

Looking for advice on where to start with event receivers

I am working on a solution that will require to detect when a page is created on prem (sharepoint 2016) and then use information from the page to create a list item online (o365 sharepoint) My ...
0
votes
1answer
35 views

How to update list item column value in ItemAdded event receiver and get the updated value in the same event?

SP2016 event receiver: I have a requirement that on the itemAdded event I have to get the list item id and manipulate it and then keep it in another column. So, on the itemAdded event, I am getting ...
0
votes
0answers
45 views

Getting the Updated Folder Name(FileLeafRef) in ItemUpdated Event Receiver gives me the wrong name

I have an item updated event receiver, when i update a folder name example "TestName" to "TestName Renamed" the properties.listItem["FileLeafRef"] gives me "TestName" and not the updated "TestName ...
0
votes
1answer
21 views

Event Recevier gets wrong date in itemAdding

I have an event receiver in sharepoint online and it is deployed in azure. so i noticed that it is returning the wrong date and have noticed that it gets the previous day if the time is 12:00AM. ...
0
votes
0answers
20 views

iTextSharp PDFReader not loading the pdf from binary byte

I have created an EvevtReceiver with item was added and item was updated on document library. I am trying to upload a pdf into document library and save the modifieddate of pdf into a column called ...
0
votes
0answers
29 views

Clarify Event receivers Document ID Generator for Item Add

Could someone clarify this for me. I am using Document ID in a SharePoint site. I have added 4 content types to a library and I note that 4 Document ID Generator event receivers have been created for ...
1
vote
0answers
57 views

Remote Event Receiver on ItemAdding triggered but not updating folder columns

I have a remote event receiver attached to a Document Library. The er is attached to ItemAdding and ItemUpdating. The same code runs on both events to update values in several columns based on the URL ...
1
vote
1answer
44 views

Will event receiver trigger on a SharePoint 2013 on premise site if site collection has been set to read only

I have one SP site where there is an event receiver that gets executed and keeps track of all the information about the documents which are getting downloaded. Business plans to make this site read ...
0
votes
1answer
40 views

Technique to run an event receiver from console app

There's a imported list with 500.000 items and an event receiver attached to it (itemAdded/Updated). I need to run the event receiver on older items meeting specific criteria but I don't want to ...
1
vote
0answers
21 views

MethodInfo mi object returning null

I am trying to use the CheckInFileByUser in an event receiver so that I can store a user object on the modified by column instead of our service account. I am getting this error mi returns null
0
votes
1answer
47 views

How to access another Site with event receiver?

I am doing an event receiver which updates a list from another Site, I don't know how to access another site using CSOM
0
votes
1answer
759 views

Sharepoint Event Receiver Not Firing on ItemAdded

I have set up a local development environment on sharepoint for the sake of testing event recievers. I can build and deploy the following code. However when I deploy the following code it does not ...
0
votes
1answer
59 views

Event Receiver - Revert back last version of document Update on Item Updating or Item Updated Event

I want to revert back the last updated version of Document through Event Receiver on specific condition occurred. I have 1 Document Library, in which I have assigned a content type. In content type ...
0
votes
1answer
15 views

Testing Event Reciever for Document Upload - Sharepoint Development Environment

You'll have to forgive my ignorance with regards to deploying this code. I have written some code to modify an event reciever. I have set up a development environment for sharepoint. The development ...
0
votes
2answers
44 views

What Event in Event Receiver should I use to catch the file uploading event?

What Event in Event Receiver should I use to catch the item uploading event? Seems that ItemAdding or ItemAdded can not catch the event
0
votes
1answer
74 views

SharePoint 2013 - GroupUserAdded event receiver not firing when adding user programmatically to group

I've added a GroupUserAdded event receiver to a SPWeb and confirmed the correct deployment via SharePoint Manager. Additionally, the call to the receiver class is working fine when adding a user via ...
2
votes
1answer
612 views

Show Item Level Permissions in Column [C# - SharePoint 2013]

I'm trying to show all Item level Permissions in a SharePoint list Column. I already solved this using PowerShell, however it was so slow to run sequentially, I've decided I need a C# Solution: I ...
0
votes
1answer
37 views

Issue with Date difference in Event receiver, If updates is coming from JSOM and SSOM

We are adding item in list with Jsom and SSOM. Following is the scenario when item is added through SSOM , we have a date field in which date is proper. Once item is added , we have an event receiver ...
2
votes
1answer
96 views

SharePoint Add Days to a Date Field Using C#

I am currently using an event receiver in a SharePoint site meant to onboard new employees. New user info is entered into a list called "New Hire Profile" and a second list called "Access Profile" is ...
0
votes
0answers
57 views

Event receiver attached to document library is not firing

Event receiver was deployed into sitecollection using powershell and site feature was activated. Using powershell , i am able to see ER is attached to library. However , it is not firing: Event ...
1
vote
0answers
76 views

Disable Event Receiver While Updating item in list

I am performing multiple update on the same list item and each time when i update the item, Event Receivers gets triggered. I need to update the item but at the same time I also want to event ...
1
vote
0answers
30 views

How to add remote event receiver to already created document library in SharePoint online?

I have a document library which has different folders in it like Task 1 , Task 2 etc. Whenever user uploads a file inside any folder lets say Task 1 , i want to assign file property(Task Name) as Task ...
0
votes
1answer
46 views

Provison Column Defaults with PowerShell/SCOM

I found several post on how to add a custom LocationBasedDefaults file in the forms folder to provision Column Defaults in a SharePoint List: First and Second These were based on CSOM/#C I was able ...
0
votes
2answers
490 views

Remote event receiver not firing (SharePoint Online)

I have downloaded the PnP sample project ECM.AutoTagging and have configured an azure service bus for debugging, have created new client id/token and updated the app manifest/web.config and so on. I ...
1
vote
0answers
33 views

Can i convert a .XLSX file to a PDF inside my server side event receiver

I am working on developing an Event Receiver inside my SharePoint farm 2013. now inside my event receiver i am trying to do the following:- to copy a .xlsx file from a document library. add the file ...
1
vote
1answer
31 views

Can anyone confirm this Event Receiver behavior in SP2013/2016?

I've done significant (though not extensive) testing in two separate environments - one SP2013 and one SP2016, and I've found that in the 2013 environment the AfterProperties of an ItemAdding event ...
0
votes
1answer
31 views

How to distinguish between an item move and a deletion

I have a question about SharePoint 2010 and the technical differentiation between an item move and a deletion in an event receiver. As I could see, when moving a document to another library, the ...
0
votes
1answer
29 views

How i can get the Label for a managed metadata single value column inside my event receiver

I am working on building a server-side event receiver for SharePoint on-premises 2013. now I have a single value managed metadata column named "OrderCustomerName", and I want to get the term Label, as ...
0
votes
1answer
100 views

Feature Event Receiver - older version of event receiver firing

Sharepoint 2013 Steps to recreate issue: 1.) Following the steps from this blog... https://sharepointgotchas.wordpress.com/tag/httpmodule/ I started with an Empty SP solution. I created an HTTP ...
3
votes
4answers
3k views

EnsureUser() will return the following error “The specified user could not be found. ”

I am working on developing a server side event receiver inside sharepoint on-premises farm 2013. Inside the code i have the following, which will retrieve a string from a drop down list column ...
1
vote
1answer
60 views

Event receiver for EditTermProperties.aspx

Is there an event receiver for page "_layouts/15/EditTermProperties.aspx"? When a user clicks ok to save I need to access before and after properties of that term. Same as we have in custom list event ...