Hot answers tagged

4

Set Always Force Install to True in for your feature. (Assuming you are using Visual Studio)...Check the feature property window and you should see this option! If you are using PowerShell, you can also use : $sln = Add-SPSolution mySolution.wsp Install-SPSolution -Identity mySolution.wsp -GACDeployment -Force


3

Which event is your Event Receiver trigging on? Because the -ed receivers are asynchronous by default (which could explain the behavior you're seeing). So, either use ItemUpdating event for your receiver, or explicitly mark your ItemUpdated receiver as synchronous (in the XML or code based on how you are adding the receiver) For XML: ...


2

It all depends on the code you run on the button click. Can you please share it with us? It's more than probably something done by your code, and your user does not have permissions to perform the action. e.g. you create a list item by code, while your "read-only" user obviously cannot create items... If you really need to take some actions on behalf ...


1

Use this code using (SPSite oSPsite = new SPSite("http://website url/")) { using (SPWeb oSPWeb = oSPsite.OpenWeb()) { //Allow unsafe updates oSPWeb.AllowUnsafeUpdates = true; // Fetch the List SPList list = oSPWeb.Lists["MyList"]; // Get the Item ID SPListItem itemToUpdate = list.Items[1]; ...


1

You can use the following code using(SPSite oSite = new SPSite("site url")) { using(SPWeb oWebsite = oSite.OpenWeb()) { SPList oList = oWebsite.Lists["Tasks"]; SPListItem oListItem = oList.Items[5]; oListItem["Title"] = "Some Title"; oListItem.Update();// without this line item will not update } } Read more ...


1

You are not elevating in a correct way, you need to create new objects for SPSite and SPWeb. But since you use the root web, as you do, you do not need to explicitly create a new object for that, so you can do the below SPSecurity.RunWithElevatedPrivileges(delegate() { using(SPSite spsite = new SPSite(SPContext.Current.Site.Url)) { SPWeb ...


1

I haven't done radio buttons before but I have done checkboxes. Create a property for each checkbox field: [Category("Category"), WebDisplayName("Division"), WebBrowsable(true), Personalizable(PersonalizationScope.Shared)] public Boolean Division { get { return _Division; } set { _Division = value; } }



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