0
votes
1answer
241 views

How to show a javascript alert and close the browser tab on button click [closed]

I have a web part with button that is clicked upon approval of a workflow. I want to add a JavaScript alert after performing all the button click c# code and then upon closing the alert the browser ...
2
votes
1answer
489 views

SPContext.Current.FormContext.OnSaveHandler Not Firing from Custom Field Type Control

I am having the exact same problem described here. Unfortunately because I don't have 50 points yet I can't comment on it so I have to create a new duplicate question. I mean it's not "100% EXACTLY" ...
0
votes
2answers
967 views

How to display and get the value chosen in an User field?

I'm very new at Sharepoint and I faced to a trick issue. Here is the situation : in an .aspx.cs file, I've created an EventHandler called btnValidate_Click, raised on a click on a button. In this ...
0
votes
3answers
87 views

On ItemUpdating modify property

I have an issue, with this event. What my purpose is: i want to update one of the properties based on few criterias, so i want do fill a field A if field A is empty and the field B is not empty and ...
2
votes
1answer
149 views

Using C++ dlls in event receiver

I am trying to use a legacy C++ dll that has around 5 C/C++ dependencies in SharePoint. I created a wrapper for the dll and it works fine in a test desktop program. I added the wrapper and all C++ ...
1
vote
1answer
296 views

Possible to attach an event receiver to the list of user alerts?

There's seemingly loads of ways of overriding the OOTB e-mail notifications for creation and deletion of user alerts - can't you just attach an event receiver to the alerts 'list' (is it an SPList?) ...
0
votes
1answer
4k views

Feature activation error: System.InvalidOperationException: Operation is not valid due to the current state of the object

i have taken one List Email event receiver(Type is EmailReceived) and that event receiver attach with document library. when i am activate that feature got error. i have check on ULS Viewer. error ...
2
votes
2answers
383 views

Item Updated through different forms runs Item Updated event receiver

Simple but mind blowing question it is. Basically I am updating a specific list items through two different ways, one is using ASP.NET web forms and one is using default list forms provided by ...
1
vote
1answer
40 views

An event to be fired on editing a file

As title says, I need an event to fire when a listitems file has been edited. I appreciate this isn't as simple as it having it's own event, which is why I've tried to make use of the itemupdating ...
1
vote
1answer
135 views

Update existing word document from SharePoint via code

I'd like to insert a line of text into an existing Word document that is stored in a document library. Would this be possible to do through an event or workflow? If so, how would I go about ...
1
vote
2answers
54 views

Event Handler on MenuBar

whats sharepoint renderingtemplate is and how can I use it to add event handler to "Respond to this survey" link button For last couple of days I have been researching on how to add some kind of ...
1
vote
2answers
357 views

Respond to survey button “Code Behind” Survey list

When any user clicks on "Responds to Survey" button/link I want to perform some operation using code behind but can't figure out how can I do it or which event handler can be used.
1
vote
2answers
158 views

Is there anyway I can find out if user uploaded multiple items in ItemAdded Event

I have a "ItemAdded" event, I want to check Number of documents uploaded if a user uses "Upload Multiple Documents" for uploading. Normally what happens is when a user adds a item they are taken to ...
0
votes
1answer
372 views

List Onload event

What I want to do: I have a custom list that contains a lot of items. When an user loads the list, all items of his view should be checked. If there is a special value in the listitem a notifiaction ...
1
vote
1answer
400 views

SPJobDefinition Execute Method isn't overriding

I built a custom Timer Job on activation I was able to debug it and it was going through Execute method I am overriding but suddenly its not overriding anymore. Code is here: public class ...
0
votes
2answers
192 views

How to check if Item Deleted in a list was the last item (in a EVENT Receiver)

I want to check If deleted item is the Last Item deleted in the List in following method, public override void ItemDeleted(SPItemEventProperties properties) { } I know I can get web url using ...
3
votes
3answers
1k views

How to create Site (SPWeb) on Sharepoint Online

I have a problem creating Sites on Sharepoint Online. The code that works on-premise do not work on Sharepoint Online. I do not want to bother you with the code, i just want a clean start. So my ...
0
votes
1answer
178 views

Timer on a SharePoint List

I came across a very interesting scenario I need a Timer for Item added Event receiver for a SharePoint List and this list is being added to hundred of Webs. Now each List needs a timer job, which ...
0
votes
3answers
1k views

ItemAdding getting the file name of a document

I have a document library. I want to add an itemadding event recieiever to do some validation on the file name of the document. How can I get the file name from the SPItemEventProperties
1
vote
3answers
2k views

Redirect from ItemAdded event

I am using an ItemAdded event handler for doing some validation. If my validation fail is it possible to redirect the user to another page. Ideally it would be good to show the page in a dialog box. ...
1
vote
1answer
273 views

workflowAssociation not displaying workflow

I have created a feature. In the FeatureActivated event I am creating some lists. I am then trying to attach a custom workflow to one of the created lists. However when I do this the workflow history ...
0
votes
1answer
61 views

Limiting a List (Listview webpart) to a single User

I have a List Definition and I want to limit only 1 specific user to "add new items" to this list, oh by the way its a custom list definition, I was wondering what are the possible ways to accomplish ...
1
vote
2answers
843 views

FeatureInstalled event receiver acessubg spweb

I am trying to add a propertie to a WebAplication on FeatureInstalled event receiver. public override void FeatureInstalled(SPFeatureReceiverProperties properties) { ...
2
votes
3answers
750 views

Sharepoint site throws exception on clicking save button after uploading a file

I have deployed an event reciever with item added event on a document library in sharepoint site. In item added event I am calculating the number of pages for the uploaded document and updated a ...
2
votes
2answers
645 views

Sharepoint development without Visual Studio on server machine

Till now I was doing Sharepoint development with Sharepoint server and Visual Studio on same machine. Now there is a Sharepoint 2010 installed on my client machine with no Visual Studio installed. I ...
0
votes
2answers
2k views

Error when using ItemAdded event handler to update columns on newly uploaded document

I have an ItemAdded event handler connected to a document library, in order to automatically populate certain fields when a new document is uploaded: public class AutoPopulateDocumentFields : ...
4
votes
4answers
3k views

SPItemEventReceiver ItemAdding - Differentiate between a file and a folder

I've setup a custom event receiver. The purpose of my event receiver is to stop people from uploading any file type except PDF's. Right now my code looks like this: if ...
1
vote
1answer
513 views

Item Adding throws server error in '/' application

Here is my code. It works but also throws following error. public override void ItemAdding(SPItemEventProperties properties) { base.ItemAdding(properties); if (ValidFile(properties) == false) ...
0
votes
1answer
2k views

Error loading and running event receiver Microsoft.SharePoint.Publishing.Internal.PublishingWebEventReceiver in Microsoft.SharePoint.Publishing

I am seeing the following error in my application log: Error loading and running event receiver Microsoft.SharePoint.Publishing.Internal.PublishingWebEventReceiver in Microsoft.SharePoint.Publishing, ...
11
votes
8answers
8k views

Event Receiver Firing for all Lists - even when ListUrl is set

I have two custom list definitions - List 1 and List 2, both with different ID's for the Type in the elements.xml. List 1 is called 'List1' and the other is called 'List 2', note that the second list ...
1
vote
1answer
2k views

ListAdded Event Receiver not Firing for List Instances

I have a List definition in Visual Studio which is instantiated using a List Instance. This list definition has an event receiver which overrides the ListAdded event. I am able to get the ListAdded ...
0
votes
1answer
77 views

How to map workflow task to the originating workflow

I would like to fire an event when Workflow Task is completed and I would like to check the original item and workflow that created the task. But I cannot find any value among the Workflow task ...
1
vote
1answer
718 views

Custom Field Control with TreeView with EventHandler issues

I have got a Custom Field Control in SP2007 (inheriting BaseFieldControl) with an ASP.NET TreeView control in the ascx. This works fine with checkboxes enabled so Users can select from the tree. But ...