Archive for the ‘Deployment’ Category

I just like to start by saying that this post is not ground breaking. However, when I tried to do this it did take me a while to find the answer, so I thought I’d just blog to add it to the grey matter.

As I’m sure you are all aware you can provision multiple files with preconfigured web parts by using a SharePoint module’s element file and a web part page as a template, by targeting the web part zones on the web part page.

However, trying to connect these caused me a bit of problems. In the end though it was quite straight forward. And can be done by specifying the following attributes in the code snippets and the descriptions given in the table below.

Okay, before anyone comments on the simplicity of this posting. It merely t allow me to get the script easily in the future. What’s the purpose of it? It basically retracts a solution and waits until its fully retracted, then deletes it, adds it in again and redeploys it. Not rocket science, but handy.

Scenario: You want to us the inherited title field in your list definition,but you don’t want it to be called title. To override what is displayed in the new/edit form is straight forward enough. You just add the DisplayName attribute to your Title FieldRef with the ID of {fa564e0f-0c70-4ab9-b863-0177e6ddd247} in the Content Type.

This is great and easy to achieve. However, you are still left with the column heading of Title in the list. This can be changed manually through the UI, but if you are constantly deploying that is not a solution.

To try and resolve this issue I changed the display name of the field ref in the view, but, as far as I can see, this does nothing at all.

List Definition View Field

<FieldRefName="LinkTitle"DisplayName="New Column Header">

</FieldRef>

In the end, I changed it manually and viewed the whole schema using SharePoint Manager 2010 . I discovered among the Schema.xml that SharePoint adds a computed column for the link title with the display name I added.

So, in essence, if you want to change the Title column value of a View add this to the fields section of the Schema.xml of the Definition.

Short one: A bit of a vague error, “Failed to do column assignments for list”, found in the SharePoint logs after trying to deploy as solution. The solution contained many list definitions, instances and content types and when deployed it was notice that one of the list was missing. I’m sure there could be many reasons for this error as it does seem a bit generic, but in this instance it was caused by either a wrong or a duplicate value being specified in the ColName attribute of a field in the list definition.

ColName Attribute

ColName=“nvarchar21“RowOrdinal=“0“>

This is not an attribute I would add manually, but some of the solution had been reverse engineered from a list. Removing this attribute resolved the problem. SharePoint will assign a value to this itself and is not needed in the XML