Category: SharePoint OnPrem

Unpublish and Checkout SharePoint Page: SPSecurity.RunWithElevatedPrivileges(delegate() { using (SPSite site = new SPSite("YOURSITE")) { using (SPWeb web = site.OpenWeb()) { //Obtain the Page PublishingPageCollection publishingPages = PublishingWeb.GetPublishingWeb(web).GetPublishingPages(); PublishingPage page = […]
This is a function in order to create a CAML Query specified for Filters. Once we have the filters, we’ve to create the parameters for the function, following this template: […]
My case: It’s a standard register form created in a SharePoint WebPart (but this error could happen even if you’re not using SharePoint). When I submit the form, sometimes I […]
When you create a custom Display Template and you deploy it, you can see the HTML uploaded, but you can’t see its JS (created automatically in theory). Problem: You don't […]
You can configure your Search Application Topology through your servers and manage all its parts separately, or (like in my case) you only need to configure it all in one […]
Run this Script in PowerShell to stop all your Crawls: Get-SPEnterpriseSearchCrawlContentSource -SearchApplication "Search Service Application" | ForEach-Object {$_.StopCrawl()} You could also start full Crawls on every Content Source changing the […]
If we couldn’t acces to the menu item “Edit Page” for any reason and we want to edit that page (e.g. to remove some webpart that blocks our page) we’ve […]
I’ve found an interesting link about how to retrieve some properties of user profiles in SharePoint 2013 by using its client object model, like this: const string serverUrl = "http://serverName/"; […]
You can obtain the Current Project Resource Rates by the following code in Visual Basic for Applications: Public Sub UpdateCostRates() Dim ProjectName As Project Set ProjectName = ActiveProject Dim N […]
If you have a server dedicated to the Distributed Cache of SharePoint, its memory can increase until 100% because of the DistributedCache process. If you look at the Task Manager […]