Unable to find custom list template and differentiate custom template list and normal list?

Yuvraj Patil 441 Reputation points
2023-01-26T16:31:58.53+00:00

Hi,
I have created a list custom template from PowerShell utility (Used script from here [https://learn.microsoft.com/en-us/sharepoint/lists-custom-template). Now I am able to see new custom template in 'From your organization' during list creation [refer attachment] and, I am able to create the using custom template and use the list.
Till here everything is okay. Now I have 2 problems here:
Problem 1- I am using CSOM for operations, so unable to get the custom list template using csom. I have tried 'Web.ListTemplates' and 'site.GetCustomListTemplates(web)' return result of both does not contain the custom list template so how am I supposed to use this for list creation from CSOM? Is it list template is created at tenant level and not any site collection/site level? help here to access the created list template to create the list using csom.
Problem 2- When I create a list using custom template and create a normal generic list (Blank list option) then how can I find which template the list referring? is there any property or anything using which I can find the template list is referring to? I looked at 'TemplateFeatureId' and 'TemplateTypeId' which have same values for custom template list and normal list, how I can differentiate them?
Thanks in advance !
Attach1

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
11,181 questions
SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
3,276 questions
SharePoint Workflow
SharePoint Workflow
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Workflow: An orchestrated and repeatable pattern of business activity, enabling data transformation, service provision, and information retrieval.
624 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,802 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.