SharePoint 2013 Mega Menu (MMS driven) – How to replicate the same mega menu for all the web applications and all the site collections

If the mega menu has been applied on a master page, so you can apply the same master page to all site collections within a web application using the below PowerShell Script

$site= Get-SPSite HTTP://webappURL #rootsiteURL
$WebApp = $Site.WebApplication
foreach($spSite in $WebApp.Sites)
{
    foreach ($web in $spSite.AllWebs)
    {
            $web.MasterUrl = $site.RootWeb.ServerRelativeUrl +  "/_catalogs/masterpage/YourMasterPage.master";
            $web.CustomMasterUrl = $site.RootWeb.ServerRelativeUrl + "/_catalogs/masterpage/YourMasterPage.master";
            $web.Update();
    }
}

Repeat the above steps for each web application on your farm

Note: I would suggest creating a new web application with multiple site collections on a test environment to test the above script before applying it on the production

SharePoint 2013 Caml Query on GUID using CSOM returns empty

I’m trying to find a file in a folder by GUID. There is a reason behind it, because I get GUID in document set history and I cannot rely on a file name.

I’m stuck trying all the possible combinations of GUD/UniqueId for internal field name and possibilities for Value Type. If I search for a specific title, the ‘same’ code works.

What am I doing wrong? What id the proper internal field name and value type. If I search in UI for the file in a specified library by GUID used in code, it finds it, so there should not be problem in configuration.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SP = Microsoft.SharePoint.Client;
using DM = Microsoft.SharePoint.Client.DocumentSet;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string() args)
        {
            String SharepointURL = "SP-URL";
            String DocLibName = "LibName";
            Guid itemGuid = new Guid("1156a28e-0c98-4c36-ac0a-fbc71d137dbd");

            SP.ClientContext context = new SP.ClientContext(SharepointURL);
            SP.Web web = context.Web;
            SP.List docLib = web.Lists.GetByTitle(DocLibName);
            context.Load(docLib);
            context.ExecuteQuery();
            SP.CamlQuery query = new SP.CamlQuery();

            //query.ViewXml = String.Format("<View><RowLimit>1</RowLimit><Query><Where><Eq><FieldRef Name='GUID'/><Value Type="Text">{0}</Value></Eq></Where></Query></View>", itemGuid);
            //query.ViewXml = String.Format("<View><RowLimit>1</RowLimit><Query><Where><Eq><FieldRef Name='GUID'/><Value Type="Guid">{0}</Value></Eq></Where></Query></View>", itemGuid);
            //query.ViewXml = String.Format("<View><RowLimit>1</RowLimit><Query><Where><Eq><FieldRef Name='UniqueId'/><Value Type="Text">{0}</Value></Eq></Where></Query></View>", itemGuid);
            //query.ViewXml = String.Format("<View Scope='RecursiveAll'><RowLimit>1</RowLimit><Query><Where><Eq><FieldRef Name='GUID'/><Value Type='Text'>{0}</Value></Eq></Where></Query></View>", itemGuid);
            //query.ViewXml = String.Format("<View Scope='RecursiveAll'><RowLimit>1</RowLimit><Query><Where><Eq><FieldRef Name='GUID'/><Value Type='Guid'>{0}</Value></Eq></Where></Query></View>", itemGuid);
            //query.ViewXml = String.Format("<View><RowLimit>1</RowLimit><Query><Where><Eq><FieldRef Name='UniqueId'/><Value Type="Guid">{0}</Value></Eq></Where></Query></View>", itemGuid);
            //query.ViewXml = String.Format("<View><RowLimit>1</RowLimit><Query><Where><Eq><FieldRef Name='UniqueId'/><Value Type='Guid'>{0}</Value></Eq></Where></Query></View>", itemGuid);
            //query.ViewXml = String.Format("<View><RowLimit>1</RowLimit><Query><Where><Contains><FieldRef Name='UniqueId'/><Value Type='Guid'>{0}</Value></Contains></Where></Query></View>", itemGuid);
            query.ViewXml = String.Format("<View><RowLimit>1</RowLimit><Query><Where><Contains><FieldRef Name='UniqueId'/><Value Type='Text'>{0}</Value></Contains></Where></Query></View>", itemGuid);

            ////This search is working
            //String value = "The test document";
            //query.ViewXml = String.Format("<View><RowLimit>1</RowLimit><Query><Where><Eq><FieldRef Name='Title'/><Value Type='Text'>{0}</Value></Eq></Where></Query></View>", value);

            SP.ListItemCollection collListItem = docLib.GetItems(query);
            docLib.Context.Load(collListItem);
            docLib.Context.ExecuteQuery();

        }
    }
}

Retrieve SharePoint 2010/2013 workflows in SharePoint 2013 using CSOM

Try using WorkflowAssociations.GetAssociationByBaseID as below
(list).WorkflowAssociations.GetAssociationByBaseID((workflow base ID));

The above returns a SPWorkflowAssociation object, which can be used as a parameter to start the workflow. e.g. below:

(site).WorkflowManager.StartWorkflow((list item),(SPWorkflowAssociation), “”);

2013 – Get all files in a site collection with PnPJS

Is there any PnPJS code out there, given a site collection URL, loop through and get all files in the site collection (loop through top level, subsites, basically all document libraries) ?

Or even as a start – just given a site collection URL – loop through all subsites?

Unfortunately don’t have access to powershell. This is SP 2013.

SharePoint Designer Workflow 2013 execute “call http request” action and is doing 4 times a retry

I have a SharePoint Designer 2013 workflow. In this workflow I have a “call http request” action. In this action I try to execute a PowerAutomate like in this tutorial. It looks like this “call http request” action has some timeout/retry mechanism. We see that if the Power Automate take allot of time to response (for example 10 minutes), SharePoint Designer 2013 will do a retry on the “call http request” action. So the Power Automate will run again. And we see that SharePoint Designer 2013 is executed this action the first time, and then 4 retry’s. Who knows about this behaviour? Is there some blog or documentation about this?

Why are there no Bitcoin price/trade records before 2013?

Example: http://www.livebitcoincharts.com/

On that chart, it starts at $135. That’s quite a sum to start with. Why does it only start in 2013 when it started "blowing up" for the first time?

"All time" apparently means "since sometime 2013".

master page – How to add an overridable meta tag to a SharePoint 2013 html masterpage?

In SP2013, I have a master page (.html/.master) file that I want specific pages that use this master page to have the ability for devs to override a specific meta tag. Specifically this one

<meta http-equiv="X-UA-Compatible" content="IE=EDGE" />

By default it comes with

<meta http-equiv="X-UA-Compatible" content="IE=10" />

But is there a way I can wrap this or move this into an asp tag that I can then override at a page level or page layout level?

I see this in the .html master page file

    <!--MS:<SharePoint:AjaxDelta id="DeltaPlaceHolderAdditionalPageHead" Container="false" runat="server">-->
        <!--MS:<asp:ContentPlaceHolder id="PlaceHolderAdditionalPageHead" runat="server">-->
        <!--ME:</asp:ContentPlaceHolder>-->
        <!--MS:<SharePoint:DelegateControl runat="server" ControlId="AdditionalPageHead" AllowMultipleControls="true">-->
        <!--ME:</SharePoint:DelegateControl>-->
        <!--MS:<asp:ContentPlaceHolder id="PlaceHolderBodyAreaClass" runat="server">-->
        <!--ME:</asp:ContentPlaceHolder>-->
    <!--ME:</SharePoint:AjaxDelta>-->

Is there a way to put it into here, such that I can override it at a page level?

Thanks

stochastic processes – Question about the intensity of a cox process, Diggle et. al (2013)

On page 2 of “Spatial and Spatio-Temporal Log-Gaussian Cox Processes: Extending the Geostatistical Paradigm” by Diggle et al. (2013), accessible at https://arxiv.org/pdf/1312.6536.pdf , they claim the following on the bottom right of the page:

“…in the stationary case the intensity of the Cox process is equal to the expectation of Λ(x)”

My assumption is that by “intensity”, they are referring to some extension of $$ lambda (t)=lim _{hdownarrow 0}{frac {1}{h}}mathbb {E} (N(t+h)-N(t)|{mathcal {F}}_{t}),$$ as taken from wikipedia at https://en.wikipedia.org/wiki/Intensity_of_counting_processes.

I mentioned “extension” because in Diggle et al’s paper, they define the Cox process on $mathbb {R}^2$, whereas the intensity definition from Wikipedia is to do with processes defined on $mathbb{R}$.

My issue is that I’m unable to find a proof of their claim. If someone more experienced in this field could explain to me why the authors’ claim is true / guide me to a relevant source, I would really appreciate it.

Thank you.

csom – How to authenticate sharepoint 2013 by FedAuthCookie in .netcore3.1.0

I am developing web application in .net core 3.1.0, for that i have to get documents stored in sharepoint 2013 using CSOM, the sharepoint app authenticates by FedAuthCookie.
In this Microsoft docs, it is explained that we have to use token authenticate sharepoint for .net standard apps. Is my understanding correct?

Is there any other way to connect sharepoint 2013(on-premises, which implements cookie based authentication) with .net core 3.1.0 or greater?

SharePoint 2013 SafeControls – from wsp manifest to web.config refuses to use System.Web.Entity assembly name

I have added the following safe control to a feature in my SharePoint 2013 solution:

<SafeControl Name="System.Web.UI.WebControls.EntityDataSource" Assembly="System.Web.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Namespace="System.Web.UI.WebControls" TypeName="EntityDataSource" IsSafe="true" IsSafeAgainstScript="false" />

This gets added to the feature file SharePointProjectItem.spdata.

When the solution is being deployed (currently) it will add the following to the web.config:

<SafeControl Assembly="AcmeCorp.Foo, Version=4.0.0.0, Culture=neutral, PublicKeyToken=3333332222211111" Namespace="System.Web.UI.WebControls" TypeName="EntityDataSource" />

But it replaces the assembly name with my own custom assembly name!

Question

Can you not add external, ala Microsoft assembly controls as safe controls to a web.config?

It feels like a bug to me.