Tag Info

Hot answers tagged

7

Form MSDN : SPEventReceiverBase.DisableEventFiring Method Prevents events from being raised. So someone could think that all events are disabled (all items, all events, all receivers). But: How DisableEventFiring / EventFiringEnabled works The setting (DisableEventFiring in 2007 and EventFiringEnabled in 2010) must be for the current event ...


6

To intercept all modals if you don't have control on their triggers, you might want to do a "catch all" proxy pattern: SP.UI.ModalDialog.showModalDialog_old = SP.UI.ModalDialog.showModalDialog; SP.UI.ModalDialog.showModalDialog = function(options) { console.log(0); //do stuff SP.UI.ModalDialog.showModalDialog_old(options); }; You will want to do ...


5

You can access the content from the ItemAdding event by using Request.Files property of the context. Try something like this : HttpFileCollection files = HttpContext.Current.Request.Files; foreach (String key in files.Keys) { if (collection[key].ContentLength > 0) { Stream stream = files[key].InputStream; ...


4

I think you will need to have some algorithm for it. Below is one which may help: Maintain the deleted sites Url and GUID in a list.You can do it using SPWebEventReceiver.WebDeleted.Also,Before it gets deleted, modify its home page to a new html like page that says "Under Construction". Create a job and monitor the list for deleted site restoration. To do ...


4

There are upgraded Fab40 templates for sharepoint 2010, one being the employee training template which is a self service event registration system. Those can be found here. The 2007 template had a few bugs with it and I'm not certain if they've been resolved in the 2010 version. I've made extensive customizations to that template, so if you have any ...


4

The 'enterprise' way to do this would be to use a proper monitoring tool such as Microsoft Operations Manager. The process I have in mind would involve: Configure SharePoint diagnostic logging such that the 'least severe' event to write to the Windows event log is [your desired severity threshold] Configure MOM to e-mail alert you whenever something is ...


3

Other than workflow or a timer job I can't think of a way you could do this. I suppose you could do it as part of some kind of batch process outside of SharePoint (i.e. not a timer job, but probably wouldn't recommend that). For workflow, you could develop a simple workflow in SPD that launches when the item is created (...we'll assume the default value of ...


3

Not really - the User Profile properties aren't stored in a list (which is where Event Receivers are registered) - they're all stored in the User Profile Database which is managed by the User Profile Service Application. If you want to sync profile changes with an external system, you can write a Timer Job to look up the user profile properties and ...


3

As James said, you could create a timer job to sync profile changes with the external system. But, to detect the changes in user profile properties, I would suggest you to look into UserProfileChangeCollection because it contains a complete log of changed user profiles. using (SPSite site = new SPSite("http://server1")) { ...


3

I don't know if this is what you are after, but I post anyhow. If you make a custom call to the modal dialog, you can execute your own code before you show the dialog. //Dialog Opening function OpenDialog() { var options = SP.UI.$create_DialogOptions(); options.url = '/Pages/myPage.aspx'; options.dialogReturnValueCallback = ...


3

I'm assuming you have some kind of unique ID that will be used in your list/library items/documents. One approach that we are currently looking at: Add a custom webpart to your "view form" and "edit form" pages (either in designer or using the ?toolpaneview=2 URL parameter). On load, use a web services javascript call to reach into your data source and ...


2

Good question. I don't believe there is an out of the box solution, but you can install SPTraceView and choose to re-route certain events to the event log. You can then consolidate your windows events log using any of the many tools available and send out email alerts. I believe someone will need to be logged in to the server in order to run SPTraceView, ...


2

I have seen this event type value when using the expand recurrence option in a CAML query. Each occurrence in the series, except series exceptions or deletions, will have an EventType value of 5. Sample code: SPList list = SPContext.Current.Web.Lists["Calendar"]; SPQuery query = new SPQuery(); query.ExpandRecurrence = true; query.Query = string.Concat( ...


2

Is this really important? LCID should be handled by the user profile itself (user language). Per design page views are not tracked (audit) and the argument here are again performance. Even if you threw in a webcontrol that monitored usage, your caching strategy would be limited. You could consider setting some of the values in a cookie, or doing the check ...


2

Workflow is the best approach to implement this scenario. You can create a simple workflow using Visual Studio which you can attach to the list and trigger the workflow on Item created and Updated and when the item is added the status is set to New. After that you can include a code activity where you can check the logic to see if task is started or Not. ...


2

If it is a partial refresh of the page, like in UpdatePanel, jQuery(document).ready(), or jQuery(window).load() don't fire. You must find some event that fires. You can start to lab with PageRequestManager. It helped me in my UpdatePanel. var prm = Sys.WebForms.PageRequestManager.getInstance(); prm.add_endRequest(doSomethingGreat);


2

If you are specifically doing a SharePoint Saturday event, Michael Lotter (@michaellotter on twitter) has a great process pretty well in place for the planning. Mark Rackley (@mrackley) has a great blog post on his site about some of the pitfalls and things to help plan an event. He pulled off the SPSOzarks event pretty much single-handedly. Here's a link to ...


2

If you're going to use the SharePoint Extensions for Visual Studio 2010 - it's a requirement to have VS and SP on the same box. On the other hand - you can handcraft a WSP using a simple assembly project, writing the XML files manually, hacking a DDF file and run makecab. OR you can use WSPBuilder and tools like that.


2

The ItemAdded is called just once on you event receiver; an item can be added just once. The ItemUpdating and/or ItemUpdated may be called multiple times. It will depend on what receivers or what workflows are active in the list and what method they use do to update the list item. Calling SPListItem.Update() triggers the events while calling the ...


2

AFAIK, that information is not stored in a plain list and you cannot add even receivers when a user or group is added or permissions are assigned. Applicable to MOSS 2007 and SharePoint 2010. Having said that, Microsoft realized a genuine need of such scenarios and made the events available in SharePoint 2013. Check this link: ...


2

There is a KB for this. http://support.microsoft.com/kb/2694420 When the OnWorkflowActivated event fires, SharePoint delivers one event for each OnWorkflowItemChanged activity inside the state machine workflow. For example, if there are 3 OnWorkflowItemChanged activites inside the state machine workflow, then there will be 3 subscriptions for the ...


2

There is no SharePoint event for view added. These are the available event receivers


2

I have done the below in SharePoint 2010, hope it will work in SharePoint 2013 also. To bring a Pop UP, you can make use of PreSaveAction function in your newform.aspx. In the newform.aspx of the list, you have to use content editor web part with the below javascript. <script type="text/javascript"> function PreSaveAction() { alert('Thank you for ...


2

SharePoint 2013 supports remote event receivers. You can get the job done through it.


1

I did this using regular expression Here is my code : downloadPath = HostingEnvironment.ApplicationPhysicalPath + properties.ListItem.File.Name; siteURL = properties.WebUrl; listTitle = properties.ListTitle; id = properties.ListItemId; WebClient webClient = new WebClient(); ...


1

To achieve this, you'd need to have a registration list that contains a lookup to the Event's ID column. Then on the Event Dispform, you'd point the users to a newitem form for the registration list that passes in the EventID. You could also have the button execute some javascript to insert the user automatically via the web services or the client object ...


1

Best links I did found so far relating recurrence events: http://msdn.microsoft.com/en-us/library/ms434156.aspx http://aspnetguru.wordpress.com/2007/06/01/understanding-the-sharepoint-calendar-and-how-to-export-it-to-ical-format/


1

There is a post which details about a custom web part which can search the recycle bin items- http://allaboutmoss.com/2011/11/04/recycle-bin-search-webpart-for-sharepoint/ Add this web part into a custom page and the results could be displayed in a grid, where each site or entity could be checked(using a checkbox) and restored by click of a button. ...


1

Here is a good article that should help you get started: http://msdn.microsoft.com/en-us/library/gg615466.aspx Also - I would download the Project Server 2010 SDK: http://msdn.microsoft.com/en-us/library/ms512767.aspx The SDK contains alot of good references and will provide you with other examples of how to access Project Server Data via the PSI. ...


1

If you're looking to automate the the status updating process, in the scenario you described above, this screams workflow to me. When an item is created, the workflow sets the status to New (which can be avoided if you set that to the default value of the choice column) then waits until the start time and sets the status to In Progress. It then waits until ...



Only top voted, non community-wiki answers of a minimum length are eligible