.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Custom Content Type

Posted By:      Posted Date: October 28, 2010    Points: 0   Category :SharePoint
I have created a custom content Type scoped at site level. Then I created a form library with settings "Allow management of content types"
When i go to "Add from existing site content types" option, this content type does not appear in the list. However this does apperar in "Site content Type" under Galleries at site collection level.

Any Idea what could be the problem?

View Complete Post

More Related Resource Links

Create a list definition without a Custom Content Type

is it possible to create a list definition without creating a custom content type?  I want to create a list definition and select "Custom List" and then I just want to add fields to the custom list and not create a content type that will show up in the SharePoint GUI.  Seems like to get the new fields to show up in the new and edit forms I have to add the fields to a custom content type.

Inserting a custom list form for a custom content type

Hello, When I try to insert a custom list form for a custom content type I created, nothing happens. Same thing is for the content type "message" & "discussion". I already cleaned up my profile (http://blogs.msdn.com/b/spdsupport/archive/2008/07/03/how-to-fix-custom-list-forms-will-not-insert-or-show-up-on-the-design-surface-of-sharepoint-designer.aspx) I use MOSS 2007 version and SP designer 2007 SP2 on Win7. Below you can see an example of the custom content type.     Columns Name Type Status Source Title Single line of text Required Item Segment Lookup Optional   Form Lookup Optional   Main Product Lookup Optional   Weight Number Optional   Price/Kg Currency Optional   Unit Price Currency Optional   Manufacturer Lookup Optional   Packaging Lookup Optional   PL Yes/No Optional   Label Lookup Optional   USP Lookup Optional   POSC Lookup Required   Place Lookup Hidden StoreCheckHeader Country Lookup Hidden StoreCheckHeader SC_Link Single line of text Hidden StoreCheckHeader

BCS Method Security / External Content Type Permissions / Custom List Security Provider / Security T


I have an external list setup with the usual CRUD methods.  The external SQL table is also being populated by another source.  I want to enable/disable deleting depending on whether the record was created from SharePoint.  I would also like the normal list permissions to work.  So if a user has permissions to delete on the list, they can only delete items created for SharePoint. 

Where should this logic be incorporated?  On the BCS Delete method, somewhere in the External Content Type or on the list instance?  Most examples I find relate to security trimming for search.  I'm only concerned about the delete method.

I'm sure there are multiple ways to accomplish this.  Which is the best?


Custom Action for specific External Content Type List


I have an External Content Type list instance feature in Visual Studio. Deploying the instance works fine. However, I can't create a custom action using RegistrationId="{$ListId:Lists/yourlistname;}" RegistrationType="List"

Even if I specify the list Id as follows RegistrationId="{8F595340-5D08-4287-8BF6-30D50989D2F4}" or RegistrationId="8F595340-5D08-4287-8BF6-30D50989D2F4" I get nothing.

However, RegistrationId="600" works fine, but for all External Content Type lists.

I added the custom action with SharePoint Designer and it works as expected. When I generate a site template and import it into Visual Studio, the custom action uses RegistrationId="{$ListId:Lists/yourlistname;}" RegistrationType="List"

Creating a new site based on the site template creates the custom action correctly. However, deploying just the custom action does not work (feature deploys, but no custom action appears). I also tried RegistrationId="0x0100D67E541CC4BB6A4A9D62D22657ECFF68" RegistrationType="ContentType" with no luck. The content type id was pulled from the list instance using the object model.

I have to tie the custom action to a specific list instance. Because the li

Unable to attach a custom SharePoint Workflow to a Content Type


I am working with SharePoint Server 2010 Beta 2, Visual Studio 2010 Ultimate RC and SharePoint Designer 2010 Beta.

I built a custom Content Type based on the Item type with a few custom site columns. I also have built a custom Sequential Workflow using Visual Studio 2010. This is a relatively simple workflow that creates a task, waits for the task to complete, sets the workflow to complete. I am able to deploy this workflow to the site collection through VS 2010.

The problem I have is that when I try to associate my custom Content Type with my custom workflow, that workflow is not listed in the workflow templates to select. There are only the OOTB SharePoint workflows to choose. However, if I create a list and associate a workflow to that list, my custom workflow is listed in the workflow template list.

This makes sense since at the start of building a custom workflow in VS2010, one of the first questions is whether the workflow is a Site or a List workflow and I selected List.

I did a little research and found some who wrote that Reusable Workflows may be attached to Content Types.  In VS2010, there is no option to build a Reusable Workflow.  That is only possible in SharePoint Designer.  However, it is possible to import a SPD workflow into VS, so I tried that.  Imported the WSP into VS201

Custom Workflow TaskEditForm(Custom Content Type) not getting displayed in Tasks List.



I have developed a custom sequential workflow. I have also developed a custom content type derived from Workflow Task Content Type.

I have 1 TaskEditForm.aspx in this custom Content Type. The custom Content Type is getting associated with the Tasks List but when I click EditItem option in ECB Menu or Ribbon,the in-built EditForm.aspx gets displayed instead of displaying my custom TaskEditForm.aspx from the custom Content Type.

Can anybody help?


Regards,Gautam Kaikini, SharePoint Developer. http://in.linkedin.com/in/gautamkaikini

cannot register custom edit form through a content type and deploy it as a feature


custom edit form through a content type and deploy it as a feature.. the RTM version of sharepoint 2010 does not register the custom forms. the elements.xml is pretty straight forward..

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
 <!-- Parent ContentType: Workflow Task (0x010801) -->
 <ContentType ID="0x010801007fc29cb23c2049c3985ccdb95fc8331f" Name="ReviewTask" Group="Content Types" Description="Review workflows task purpose" Inherits="TRUE" Version="0">
   <FieldRef ID="{2C2BE3C6-0EB6-4F53-B612-CF49A7EF4013}" Name="Review Status" />
   <FieldRef ID="{CE1D0566-DDC6-4AA3-80C2-6CEA892F105E}" Name="Review Date" />
   <FieldRef ID="{07CB9AA2-0102-4741-9F9A-AC4A7D62D769}" Name="Review Comments" />
   <XmlDocument NamespaceURI="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms/url">
    <FormUrls xmlns="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms/url">

Problem while creating task with custom content type in sharepoint workflow


Hi all,

I am trying to create task with custom content type in sharepoint statemachine workflow. But it is showing "Error Occured" after task creation code is excecuted. can anyone tell me what is the problem.

Task Content type


  <ContentType  ID="0x01080100A707C0079E8547c0A87515457DB90629"
      Description="Workflow Task"
      <FieldRef ID="{9da97a8a-1da5-4a77-98d3-4bc10456e700}" Name="MyComments" DisplayName="MyComments"  />
      <XmlDocument NamespaceURI="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms/url">
        <FormUrls xmlns="

Icon for custom content type



I could not find anything concerning custom icons for content types. I have defined a custom task content type and now I want to assign a custom icon for it. The only way to set item icons I know is to edit the DOCICON.XML, but I do not have a file extension here.

Is there a way to do it programmatically?

Cannot Display Application Page as Custom Form for Content Type



I've created a custom content type in VS. In "Elements.xml" file of my content type, I added my custom application page as new form and deployed as feature.

   <XmlDocument NamespaceURI="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms">
    <FormUrls xmlns="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms/url">

how to create a custom task content type for VS2008 workflow



i want to create a WorkFlow by VS2008 and i want to use custom content type for the tasks, and i want to build this cutome content type by Aspx form but i don't know how, any ideas ??


Thanks for all.

Programmatically change DisplayName/ Title for custom content type


I've created a custom content type with the following code.

if (currentWeb.ContentTypes["My Content Type"] == null)
  var myContentType =
    new SPContentType(currentWeb.AvailableContentTypes[new SPContentTypeId("0x01")],
              currentWeb.ContentTypes, "My Content Type");


After that I add this content type to a generic list. If I now click on "New element" on my list ribbon I can add a new item with displayname "My Content Type". How can I change this value as I want to name my content types like "xxx content type" but don't want to see "xxx content type" in the "New element" action.

I expected the name of the content type to be some kind of internal and I'm looking for something to be change the displayname or title to be able to display something different. If I didn't made myself clear, I'll try to be more explicit. Thanks in advance.

Custom ribbon button on content type not shown in XsltListViewWebPart


Hello all,

As a bit of background: I'm currently busy developing a content type with some kind of status (waiting / in progress / done). I want to make the users life a bit easier to complete an item so I want to add a button to the ribbon that sets the selected items status to "Done".
This works when I go to the list and click on the item (I see my button and it works perfectly). The problem is that this button is not visible when I add a view of this list on the homepage, then suddenly my button does not show.

Does anybody know what can be done to also show the button inside the ribbon of the XsltListViewWebpart? Below is my elements.xml that I use.


<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  Title="Add a Ribbon Button">
     <Button Id="Ribbon.ListItem.Actions.NewRibbonButton"

How to create a custom content type with own custom view ,add, edit and delete form in sharepoint fo


How to create a custom content type with own custom view ,add, edit and delete form in sharepoint foundation server 2010 using visual studio 2010?

I donot want to use default form "form.aspx".

we can use my custom form in place of "form.aspx"?

Adding New Custom Folder Content Type doesn't show up on the Document Library New Menu


I been trying to add new custom folder content type to the document library programatically in my sandbox environment and it does show up on the document library. But, when I move same code to the almost similar configured SP2010 environment, adding new folder content type to the document library doesn't show up on the document library's new menu.

Here is the code? Since this code works fine in my sandbox environment, is there any other settings I should check on the server environment which would cause hiding content type on new menu of document library.

  class Program
    static void Main(string[] args)
      SPSite spSite = new SPSite("http://sp2010vm");
      foreach (SPWeb spWeb in spSite.AllWebs)
        spWeb.AllowUnsafeUpdates = true;

        //For each site, cycle through lists
        bool isDocLibraryExists = false;
	      foreach(SPList spList in spWeb.Lists)
          if(spList.Title == "Classified Documents")
             isDocLibraryExists = true; 
        if(isDocLibraryExists == true)
          //Create new doc library
          SPList splist = spWeb.Lists["Classified Documents"];

          //Create Content Type
          SPContentType documentContentType = spWeb.AvailableContentTypes["Classified Documents Folder"

http 400 Error when performing item upload after setting custom edit form on content type



What I am trying to do is create custom edit forms for different content types within the same document library.....so basically I have done the following:

  • I have created two site content types and reconfigured my library to use CT's. 
  • I then connected to my site using SPD. 
  • When examining my library I can see that I have the two CT that I added earlier.  I then created a new editform for one the CTs using the top ribbon menu and in the drop down box associated it to the CT.  I did not select this as the default form for the library.
  • I then updated the library CT (not site CT) with the url to form in the editform properties.

When I create a document and edit the properties it works fine - totally as expected.  However when I upload a document the default EditForm for the library is used and I can select the CT to associate the document to.  When I choose the CT with the custom form the new edit form is not found and I get a page not found error - http 400.

The full url for this library is is http://XXXX/functions/ehs/CSI

So the URL I have used is /functions/ehs/CSI/Forms/EditForm2.aspx (EditForm2.aspx) is my form and this is fine.  I have even used CSI/Forms/EditForm2.aspx and this works...  BUT ne

How do I deploy a custom form with a Content Type?

I have a VseWSS solution which deploys a site definition. Within this are some site columns and content types. With one of these custom content types, I'd like to use a customised form for displaying details. I know how to do it manually via SPD (List Properties > Supporting Files > Content Type, etc) but I can't figure out how to include it in my package.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend