Question

I have lists of Master Pages, Page Layouts, Content Types, Field Types, Site Columns, Lists and Web Parts, in different CSV file(s). These CSV(s) have the OOTB and Custom records. I want to filter OOTB records from these sheets.

Could you please let me know how I can filter these?

  • How I can identify using the Content Type Name/Id - if it is the OOTB or Custom?
  • How I can identify using the Field Type Name/Id - if it is the OOTB or Custom?
  • How I can identify using the Site Column Name/Id - if it is the OOTB or Custom?
  • How I can identify using the Web Type Id/Type/Assembly - if it is the OOTB or Custom?
  • How I can identify using the Event Receivers Id/Name/Assembly - if it is the OOTB or Custom?
Was it helpful?

Solution

There is no built-in method to check OOTB Master Pages, Web Parts, Event Receivers and Page Layouts.

However, Site Columns, Field Types and Content Types are having built in function to identify whether it's OOTB or Custom.

Content Types

We can pass Content Type Id and get to know if it's OOTB or Not. If Result = true, that means this Content Type is OOTB.

using Microsoft.SharePoint;

SPContentTypeId ctId = new SPContentTypeId(contentTypeID);
bool result = SPBuiltInContentTypeId.Contains(ctId);

Site Columns and Field Types

We can pass Site Column Id OR Field Id and get to know if it's OOTB or Not.

If Result = true, that means this Site Column Id OR Field Id is OOTB .

using Microsoft.SharePoint;
Guid guid = new Guid(customFieldID);
bool result = SPBuiltInFieldId.Contains(guid);

Web Parts

We can write our custom function, which will check if WebPart Assembly starts with Microsoft, mark that as OOTB Web Part.

Event Receivers

We can write our custom function, which will check if Event Receivers Assembly starts with Microsoft, mark that as OOTB Event Receivers.

Master Pages

We can write our custom function, which will check if Master page name belongs to any of these - "publishingmastertemplate.master","oslo.master","minimal.master", "v4.master","seattle.master", "nightandday.master","default.master", "app.master","mysite.master","mysite15.master","MWSDefault.master","MWSdefaultv15.master", mark that as OOTB Master Pages.

Page Layout

We can write our custom function, which will check if page layout name belongs to any of these - enter image description here , mark that as OOTB Page Layout.

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top