Reputation: 359
I added an ItemAdded eventreceiver for a SharePoint document library programmatically and everything works fine on my computer. I checked in my code and my colleague got the latest code from our TFS, built the project and tested it.
On my colleague's computer the ItemAdded event triggers three times when he adds a document from the SharePoint GUI.
On my computer it only triggers once as it should.
Have you seen something similar and do you know how to solve it?
Upvotes: 0
Views: 1073
Reputation: 1
I found that after removing multiple upload link in upload popup, then it is calling itemadding event only once
Upvotes: 0
Reputation: 436
I will recommend sharing code on ItemAdded.
Also as long it works ok on most of ur machines and issue is with 1 machine , you are good.. Just get a new site collection , retract-delete solution fully , IISReset and deploy the solution again
Upvotes: 0
Reputation: 2683
do you have the similar contenttypes on the list? I remember an issue that various events will be fired once per conenttype on the list.
Workaround is to check the contenttype of the current item by using
properties.ListItem[SPBuiltInFieldId.ContentTypeId]
This workaround is working fine in our solution. Somewhere on MSDN i found an article describing that issue. Actually I can't remember the exact link. Sry
thorsten
Upvotes: 1