Hot answers tagged

21

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 collection....


15

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 ...


11

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;, ...


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 ...


9

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 ...


9

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: http://ericoverfield.com/sharepoint-2013-tricks-hide-elements-in-dialogs/


9

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 ...


8

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. ...


8

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 ...


8

Add the following snippet: <WebPartPages:WebPartZone runat="server" Title="TestZone1" ID="TestZone1"> <ZoneTemplate></ZoneTemplate> </WebPartPages:WebPartZone> It works.


8

"Modern" list and libraries do not support as many customization options as "classic" lists and libraries. In this article we'll provide details and examples of the supported options. The SharePoint team is working to support more options in the future. The list below gives a quick overview of the supported capabilities for "modern" lists and libraries: ...


7

I think if you have no limitation on using the server object model, that would be the best option. In my opinion, these are the advantages: Better performance Code more "ordered" Compiled code Simpler to use Elevated privileges More classes Of course it is an opinion and depends a lot on each case. But in general terms, if I have no limitations, I would ...


6

Use this method: ms-word:nft|u|TEMPLATE URL HERE|s|SAVE LOCATION HERE ^That is the URL Note: The beginning prefix tells the browser which tool to launch. So if the template is an Excel file, you'll need to change that to 'ms-excel:nft|'. I'm not positive that the Excel method works but it works for Word as shown above. Also, make sure not to add any ...


5

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

There are Two ways u set your application page as List Default New/Edit/Display Form. Check This http://ikarstein.wordpress.com/2010/12/29/walkthrough-create-custom-sharepoint-2010-list-form-for-deployment-in-a-visual-studio-2010-project/ also in schema of your custom list definition add this after FieldRefs <XmlDocuments> <XmlDocument ...


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

If you want to show the navigation to Anonymous users too, then using the Server Side Object Model is your only option. You can run the navigation code inside a code block with elevated privileges. Also, modifying the navigation with the Server Object Model is only allowed in Farm Solutions. See this link for examples: http://discoveringsharepoint.wordpress....


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

Here is how you create a new site using a custom .wsp template with PowerShell. $mainurl = "http://<WEBAPPURL>/sites/<NAME_OF_SITECOLLECTION>" Write-Host -ForegroundColor White " – Creating Site Collection $mainurl…" -NoNewline New-SPSite $mainurl -OwnerAlias locadministrator -Name "This will have a custom template" Write-...


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 !...


4

The same issue occurred at my end when I placed the assembly reference in the page directives (top of the page layout). Namespace was as below: <!--SPM:<%@Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"%>--> So I ...


4

it is little tricky,here are the steps. simply proceed as you would normally to create a new Site Collection, however when it comes time to select a template to base the new site collection select the Custom tab (on the extreme right), which should only have one option – < Select template later … >. Select this option and continue with the new site ...


4

Make sure SharePoint server have the WorkFlow Manager installed and configured. WorkFlow Manager also requires ServiceBus to be installed Then run the following commands in the SharePoint Management Shell: Register-SPWorkflowService -SPSite 'http://localhost:24000' -WorkflowHostUri 'https://localhost:12290' -AllowOAuthHttp -Force $WmsSap = Get-...


4

At present you cannot add any custom actions in new experience of SharePoint. Microsoft has blocked modifications in SharePoint's new UI. You can refer this uservoice. Also you can vote it.


4

It isn't possible without deploying something to each site. In addition, the search bar will be moving to the SuiteNav, I believe scheduled for end of this month. As for anything in the SuiteNav, it should not be overridden with custom CSS.


3

var list = SPContext.Current.Web.Lists[new Guid(Request.QueryString["list"])]; var itemId = 0; if (string.IsNullOrEmpty(Request.QueryString["id"]) == false) { int.TryParse(Request.QueryString["id"], out itemId); } SPListItem listItem = null; if ...


3

The "right" answer is in your point #2; don't do this as it is not supported. To address your point #1, any change made to files in /_layouts/ is farm wide so all lists everywhere will pick up the change immediately. If the client is really insisting on this then one option would be for you to copy the versions.aspx page to a custom folder under /_layouts/...


3

Assuming your pages reside in a document library typically named as 'Pages' or 'Site Pages' what you need to do is go to manage permissions for the custom page and stop inheriting permissions. You need to give unique permissions to those pages and just grant users/groups whom you wish to make these pages accessible. That ways you can exclude group or a ...


3

Here is a straight-forward guide. The issue is to show XSL code, which is ghosted. You can show them by touching XSL-driven layout in WYSIWYG editor of SharePoint Designer 2010, but Post.aspx requires ID parameter to show a Post XsltListViewWebpart. Open Post.aspx on All Files/Lists/Posts/Post.aspx in SharePoint Designer 2010 There is no XSL code. It's ...


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