New answers tagged

0

When you use a Sandbox Solution in your site collection, By default SharePoint set the Resource Quota 300 server resources. Same thing also applies to office 365. This capability is critical to maintaining the stability of the farm.Quotas for sandboxed solutions are measured in units of resource "points." Resource points are a calculated value that ...


0

I think the problem really comes from a resource quota being exceeding at the site collection level. Note that the error message mentions the "daily quota". So maybe you had several tries in the day, each resulting in increasing the resource counter (if you had unhandled errors for instance). So, the first suggestion it to try by increasing the quota for ...


2

IMO, the only correct handling of this problem would be to have only one VS project, building into one single WSP package. And also: one feature only. The feature that provisions files should be the one that deletes them at deactivation. It does not make sense to activate F01 and deactivate F02 to undo what F01 did! Furthermore, how F02 would be activated in ...


0

public override void ItemUpdating(SPItemEventProperties properties) { base.ItemUpdating(properties); sendItemTolist2(properties); } private void sendItemTolist2(SPItemEventProperties properties) { SPSecurity.RunWithElevatedPrivileges(delegate() { SPWeb webPropertiesListItem = ...


0

Turned out I've handled the operation a little too late because it works only when handling the event ItemFileMoving not ItemFileMoved. It's as simple as that: properties.Cancel = true; because the ErrorMessage won't be displayed in Explorer. The default Windows error message looks like this:


0

I know this post is old, but for anyone who has a similar use case for this. If you are launching your forms in the dialog, you can assign a function to the dialogReturnValueCallback property of the options object that you pass to your function that opens the dialog. For example: // Using the DialogOptions object function showDialog() { var options = { ...


0

What you have: You need to use an ..ing event to be able to cancel event From the ..ing event, I suspect you do edit the current item. This update happens right before the actual update, hence the save conflict. Some notes: A new instance of your ER class is created for each update triggered by a user. You can actually check before properties from ...


1

The problem turned out to be inside StartSomething: it was trying to update the very same item, upon which the OnItemUpdating had been fired. To solve a problem it is sometimes enough to write it down :)


-1

you have to play something on ListUrl="Support/Lists/Suggestions", try for ListUrl="Suggestions"


0

The better way is use the property UserLoginName, that returns the user login which fires the event, example below: SPUser authorUser = web.EnsureUser(properties.UserLoginName); //properties is the SPItemEventProperties properties //SPWeb is properties.OpenWeb();


0

I think i found an error. My testing enviroment was local server and deployment server was office 365 sharepoint. i tried the simple code and it started to work. I guess i will have to start logging what exactly caused it :) this code worked: public override void ItemAdded(SPItemEventProperties properties) { base.ItemAdded(properties); ...


2

Redirecting after an item is added might be tricky. If you would handle ItemAdding event then the only option that I know of to redirect from within an event receiver is to use CancelWithRedirect: properties.Status = SPEventReceiverStatus.CancelWithRedirectUrl; properties.RedirectUrl = "https://www.google.co.in/"; You need to keep in mind that in ...


0

Open package.package , in the bottom switch to advanced tab. Click add. Below screen will popup. Fill the required details. This way,you can add external assemblies to your wsp. This post will help to understand more.


2

Declaratively (with elements.xml), you can attach an event receiver (ER) to a content type (CT), meaning all items in all lists of the site based on this CT will have the ER. This can be done from the CT declaration XML itself, see for instance Event receiver attached to content type via XmlDocuments ignored? or the XML block in this MSDN article. But my ...


0

You can add event receiver in element.xml for library as below. --> It will not seen for all site and sub site. It will applied on only one list instance which is mention by user in Name property of below code. Code: <?xml version="1.0" encoding="utf-8"?> <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <Receivers ...



Top 50 recent answers are included