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


10

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

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

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


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

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/


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

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


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

I believe John is correct if you are limited to Out-of-the-box solutions but there is another option if custom code is available to you. Create your own application page to handle Access Requests and have it generate the email in whatever format you want. Since you would be creating this email in your own code, you would control all addresses used so you ...


6

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.


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

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

You would have to write a custom control to make that happen. Another approach could be to change the value after selection with javascript/jQuery. For example, change the date to Today for anything <= today, and tomorrow for anything > today.


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

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


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