Freitag, 16. November 2012

Hide the title column in a custom content type

One of the problem which I had most of the time when I tried to create a custom content type was "How can I hide title column in my custom conten type?"

The Solution is very easy. You must break the Inherits from item and add RemoveFieldRef to your content type definition :-).

Hier is a code example which can you use as an example for you:

<pre class="brush: xml">// Comment
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <!-- Parent ContentType: Item (0x01) -->
  <ContentType ID="0x01006ffb64509c2341d2bff13b98859f792b" Name="MyTestCT" Description="My Content Type" Inherits="FALSE" Version="0">
    <FieldRefs>
      <RemoveFieldRef ID="{fa564e0f-0c70-4ab9-b863-0177e6ddd247}" Name="Title" />
      <FieldRef ID="{38B8C4D9-6048-44A3-A092-BB11DD7F6861}"  Name="MyNewfield" Required="TRUE"></FieldRef>
    </FieldRefs>
  </ContentType>
  <Field ID="{38B8C4D9-6048-44A3-A092-BB11DD7F6861}" Name="MyNewfield" Group="My Cloumns" DisplayName="My New Field" Description="My New Field" Type="Text" Required="TRUE"/> 
</Elements>
</pre>

Dienstag, 6. November 2012

Debugging InfoPath 2010


For my client, I am currently developing a solution in SharePoint 2010 Enterprise Edition based upon InfoPath 2010 and Nintex Workflow 2010.

Because the InfoPath 2010 Form contains a C# based Code Behind File, it must be published using SharePoint 2010’s Central Administration Site.  However, this form of deployment an create debugging problems, because many of the errors that are logged in by SharePoint in the United Logging Service (ULS) cannot be mapped directly to specific lines or functions that exist in the InfoPath 2010 Form code that are actually causing the errors. =(

Thankfully, Nik Patel has written an excellent step-by-step article describing how to setup and configure debugging for InfoPath 2010 Forms using Visual Studio 2010. After I followed these instructions I was able to debug my InfoPath forms project properly, and complete my project with a smile! =)

The content type is part of an application feature

Recently I had the problem in a production environment that after the deactivation of a feature I was not able to delete the content ty...