Hot answers tagged

14

The log file should get you the path that SharePoint unsuccessfully tries to resolve. Try adding "~sitecollection" first in the ScriptLink like: <SharePoint:ScriptLink language="javascript" name="~sitecollection/custom/jquery-1.10.2.min.js" runat="server" Localizable="false" /> but this will only work inside the "the_new_osce_portal" Site ...


9

Ok, there are APIs to support everything you're tyring to do, NEVER DIRECTLY EDIT THE web.config!!!!!!! Follow these easy steps: Package your custom error pages into a solution. Hey, if you're doing the 401 you might want to add a couple of others to support access requests too ;) Deploy the pages to {SP_Root}\Tempates\Layouts\MyErrorPages\ using a ...


9

There is an identified issue with SharePoint 2013 ignoring the values set through the Set-SPCustomLayoutsPage cmdlet. See: Custom Access Denied Page in SharePoint 2013. Although the same UpdateMappedPage method and Set-SPCustomLayoutsPage cmdlet exists in 2013, there is an identified bug in the product related to the property. The custom location can be ...


8

In the 2nd statement you should have used the site collection specific TOKEN as in: <SharePoint:Scriptlink runat="server" Name="~sitecollection/Style Library/[YOUR SITE]/PathToJqueryLib/jquery-1.10.2.min.js /> The issue with your 3rd (also known as Client-Side JavaScript library reference) is that such constructs do no recognize token-based ...


7

There are many ways that you can approach this issue and it all comes down to what the desired functionality and behavior is for both the user and the content editor. One of the most common ways I have done this in the past is to use one master page that has all the publishing controls still in it. By default you have to be logged into a site for it to ...


7

Down in the Standard Colors section you can add more colors by including styles like this: <style> .ms-rteForeColor-11 { color: darkred; -ms-name: ""; -ms-color:"Dark Red"; } .ms-rteForeColor-12 { color: darkred; -ms-name: ""; -ms-color:"Dark Red"; } </style> Similar you can define new background colors using .ms-rteBakcColor-XX ...


7

SharePoint 2013 In 2013 you can use design manager for generating web-part zone snippet. To insert a Web Part zone snippet Browse to your publishing site. In the upper-right corner of the page, choose the Settings gear, and then choose Design Manager. In Design Manager, in the left navigation pane, choose Edit Page Layouts. Select the name of the page ...


6

somthing like this? http://msdn.microsoft.com/en-gb/library/ff408263(v=office.14).aspx or i think your talking about this: Create SharePoint Project 1.Open Visual Studio 2010 2.Click File -> New -> Project 3.Select “Empty SharePoint Project” under SharePoint -> 2010 category. 4.Enter Name for the project e.g. SampleWebTemplate. ...


6

Add the ms-dialogHidden class to your outer div, it will hide the content in dialogs: <div class="ms-dialogHidden" style="background-image:url('/Style%20Library/lfr/header.jpg');background-position:left; background-repeat:repeat-x;height:147px;"></div> For more, see here: ...


5

Customisations to the Data Sheet View are not supported, as this is generated using the Microsoft Office Access Web Datasheet Component, which renders the grid using the same base engine as the data sheet view that Microsoft Access uses.


5

Why are you deploying your Custom Web Service to the layouts folder at first place? You need to copy the Web service files to the _vti_bin virtual directory Copy the Service1wsdl.aspx file, the Service1disco.aspx file, and the Service1.asmx file to the _vti_bin virtual directory. This is the directory where all default Web services are stored. Copy the ...


5

I figure your problem is that you have not specified URL for MainMenu. As you notice all links in QuickLaunch has link associated with it. Specify a Url and it should work (I tested that locally).


5

If you want to customize a list new\edit\display form there is a couple of ways you can do it. I mean programming ways (not InfoPath). All this methods related to creating custom rendering templates. Every list form has its own rendering template, for list its a "ListForm", for document library "DocumentLibraryForm". All this templates (and otheres) listed ...


5

You can always generate new GUIDs using Online GUID generator or using Visual Studio This is how you can provision your field and use it in a Content Type using FieldId and FieldRef. Follow the sample elements.xml below: <?xml version="1.0" encoding="utf-8"?> <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <Field ...


5

To achieve this, You can use ListItemCollectionPosition property. It is used together with the RowLimit property to define paging in a query. For your reference, see the sample code available this link http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spquery.listitemcollectionposition.aspx I hope this will resolve your problem.


5

Ok, I got the formatting right. The first reply was correct from Aboba with the link to the blog post. I just didn't have the formatting right the first time. I ended up with <a onclick="CoreInvoke(&#39;createNewDocumentWithRedirect2&#39;,event,&#39;http:\u002f\u002fsiteurl\u002fDocumentLibrary\u002fForms\u002fSOP\u002fSOP.dotx&#39;, ...


5

Yes you can extend the REST API: Here are the high level steps of what you must do: Create a class decorated with ClientCallableType Add methods and properties to the class, decorate with ClientCallable, ClientCallableMethod, ClientCallableProperty Create the Object Factory that inherits from ClientCllableObjectFactory (this will create an class instance ...


5

You can choose any of the 3 options from below. Option 1: Replace the default PageNotFoundError.aspx in the Page Library – One of the easiest and Convenient way to replace default text in PageNotFoundError.aspx is to either edit the PageNotFoundError.aspx that resides in the Page Library or to delete it and replace it with a Custom error Page that has the ...


4

Don't know really HOW, but this code works! Take a look =) public partial class VisualWebPart1UserControl : UserControl { private Microsoft.SharePoint.WebPartPages.ListViewWebPart myListView; protected override void CreateChildControls() { base.CreateChildControls(); SPSite oSiteCollection = SPContext.Current.Site; ...


4

Error 401 is for Unauthorized Access (or Access Denied). In a SharePoint site, "Access Denied" is managed at two levels - IIS and SharePoint. The web.config changes you did are meant for IIS. As "access denied" inside SharePoint site is managed by SharePoint, for IIS there is no 401 and hence no redirection. To set custom 401 page for a SharePoint site, ...


4

Yes, you can change the order. The webpart that displays the posts is just a list view webpart. The trick is this - go to the posts list add a new view, get it sorting the way you want, test. save. go back to your blog homepage edit the page edit the 'posts' webpart's properties select your newly created view in the 'list views' section click OK. Save. ...


4

I think that error is caused by something else in your event receiver code, the error message shown by properties.ErrorMessage should be something like this:


4

Paging in SPQuery is implemented through the class SPListItemCollectionPosition. The SPListItemCollection returned by SPQuery.GetItems contains a ListItemCollectionPosition property which is null if no more pages and otherwise can be used assigned to the corresponding property in SPQuery before a new call to GetItems. (Sample at the link above)


4

Don't make property List static EDIT: Working code: [ToolboxItemAttribute(false)] public class MyDetailWebPart : WebPart { ... [Personalizable(PersonalizationScope.Shared)] [WebBrowsable(true)] [Category("Category")] [WebDisplayName("Name")] [Description("Desc")] public string Code { get; set; } ... protected override void ...


4

I realize that you said you hadn't changed the names of anything, but there is another place to check for possible incorrect references: I ran into the "type is not registered as safe" problem too, and it had to do with me changing the namespace and name of the web part. I thought I had accounted for the changes everywhere, but then discovered that there ...


4

You should create RoleDefinitionBinding object set the type of permissions to it and add it as parameter to RoleAssignments of list item. There is example of how to add group with read permissions to list item: using System; using Microsoft.SharePoint.Client; using SP = Microsoft.SharePoint.Client; namespace Microsoft.SDK.SharePointServices.Samples { ...


4

You are trying to read the property values too early in the web part life cycle. The property values are populated from the content database after the constructor has run. If you check the property values in OnLoad or OnPreRender you will see the values you have set in the editor.


4

Even though SPWeb is declared outside of try catch block, it is initialized inside try block. And it is disposed inside try and finally blocks. So there won't be any memory leak. Only issue I see in the code is that in the finally block, there should be a null check before an attempt is made to Dispose SPWeb object. finally { if (newCommunitySite ...


3

It sounds like SharePoint is trying to activate your feature using a SolutionID instead of a FeatureID. Make sure you did not use the same guid as both a FeatureID and a SolutionID.


3

If you've added your ASPX page to a "Layouts" mapped folder, you can access it at any site collection or subsite level, by adding /_layouts/ProjectName/YourAppFile.aspx to url of your site, such as: http://webapp/sites/sitecollection/subsite/_layouts/ProjectName/ApplicationPage.aspx



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