Showing posts with label list. Show all posts
Showing posts with label list. Show all posts

April 19, 2007

MOSS: Approval and Collect Feedback workflows cannot be associated to custom content types

Problem:
When I add a OOB Document Library to a site, Approval and Collect Feedback workflows are automatically visible for the documents. In other words, these workflows are associated with the 0x0101 content type.

When I create a custom document library using a custom content type that is a direct child of 0x0101 content type, these workflows cannot be associated to that content type.

Thoughts:
It doesn't do any good to set the BaseType of your custom content type to 0x0101.

Neither does it help to put a AssociationCategories tag into the ReviewWorkflows feature, trying to associate the OOB workflows to your custom content type.

If you include both your custom content type and 0x0101 content type in your custom Document Library feature's schema.xml, you can see the Workflows menu item in the menu when you hover mouse over a document in your custom list. But still there are no workflows associated.

Workaround:
Associate workflows to content types manually using a browser.

Solution:
Unknown.

April 16, 2007

MOSS: Setting list view title in ONET.XML

Problem:
Title of a list view (ListViewWebPart) cannot be defined in ONET.XML so it cannot be set different from the title of the list it is showing.

If I modify the title with a browser (Modify Shared Web Part / Appearance / Title) and save the site as a template the new title is nowhere in the .stp file, still if I use that template to create a site the changes are there.

Solution:
Use the WebPart tag and define the Title under it. In the following example a minimized List View Web Part is added with a title My custom title.

<View List="Documents" BaseViewID="11"
WebPartZoneID="Left" WebPartOrder="3" Scope="Recursive">
<![CDATA[
<WebPart xmlns="http://schemas.microsoft.com/WebPart/v2">
<Assembly>Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral,
PublicKeyToken=71e9bce111e9429c</Assembly>
<TypeName>Microsoft.SharePoint.WebPartPages.ListViewWebPart</TypeName>
<Title>My custom title</Title>
<FrameState>Minimized</FrameState>
</WebPart>
]]>
</View>