0

I've been asked to help with a site that another person created. SharePoint 2016, on-premise. Was developed in 2015 and moved to a newer 2016 server.

While looking at the custom code, I see that the original developer referenced a Content Type ID in a particular function. I have looked at each of the Content Types on the List and none of them match the one in the code.

Just trying to find out what Content Type is associated with the Content Type ID that I have in front of me.

Can anyone suggest a way to reverse-lookup the content type ID, so I can determine the Content Type it is for?

thanks a bunch!

2

You should be able to view the site content type through the web UI, using the following url:

https://site/_layouts/15/ManageContentType.aspx?ctype=0x0100...

Just replace the 0x0100... with your Content Type ID and https://site with your site url.

0
0

If you're comfortable with PowerShell, then you can run this with the SharePoint Management Shell and it should look on each web page and find out if the content type exists in it. Then you can look through where it's located, etc. By default (last line) I've set it to say what the relative URL is for the content type.

Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue

$contentTypeId = "0x00A7470EADF4194E2E9ED1031B61DA088401"
$contentTypeInstances = @()

Get-SPWebApplication | Get-SPSite -Limit ALL | Get-SPWeb -Limit All | %{ 
    $site = $_
    $_.ContentTypes | % {
        if($_.Id -eq $contentTypeId){
            $contentTypeInstances += $_
        }
    }
}

$contentTypeInstances.scope

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.