Sean Holmesby

.NET and Sitecore Developer

By

Team Development for Sitecore – Field Level Deployments

I originally published this post on the Igloo blog.

team

A couple of months back I blogged about the Advanced Usage of Team Development for Sitecore, which included in concept of Field Level Deployments. This blog post revisits Field Level Deployments, and how you could set the value of a new field on a existing items.

Hedgehog Development’s Youtube video on Field Level Deployments talks about the fields that you’d want to always be controlled by developers (i.e the Security field), however here at Igloo we’ve found we’re mainly using it to set the value of a new field on an existing item.

Consider a template for a Shoe Product. You may have had this template in your solution for ages. Now you want to add a new field to that template called ‘Category’ and the value for each shoe could be ‘Work’, ‘Football’, ‘Sprinting’ or ‘Long Distance’.

You will want to set this field on all of your existing products, however you’ll only want to set it once (when you deploy the feature), then leave it up to the content editors to change from there on.

Setting the Field

Field Level Deployments allow you to do the first part, by allowing you to push the value of a field during deployment, without pushing the entire item. This allows you to set the field ‘Category’ for a shoe without overwriting it’s title or description.
1. Firstly, bring the item into TDS and set the field’s value.
Shoes
2. On the content item’s properties, set the Deployment Strategy to DeployOnce to make sure the whole item isn’t pushed during deployment.

Item-Deployment

3. Now right-click the TDS item and select ‘Field Level Deployment’. You will be shown a list of the item’s fields*, where you can select the field you’ve made the change for, in this case the ‘Category’ field. Now TDS knows to push this item’s field value when we deploy.

* The actual fields available to you will be the ones that have changed from the Standard Value for that item. If you have left the field blank, or used the default value from the Standard Values, the field will not show up in the list.

Field-Level-Deployment-Menu

Field-Level-Deployment-Fields

Leaving it for content editors

Once deployed, you want the content editors to have control, however with the current setup, your TDS solution will push the field value every time you deploy. Basically you now have to remove the ‘Field Level Deployment’ on the field so that it won’t stomp any changes made by your content editors.

4. Right click on the item, select ‘Field Level Deployment’ and un-check the field from the list.

Even though it’s a multi-step process, it ensures your feature will be deployed correctly.

Links

Team Development for Sitecore
TDS Field Level Deployment Video

5 Responses to Team Development for Sitecore – Field Level Deployments

  1. Lan says:

    Hi there,

    We have an requirement to clear the standard values for a template. So what we did is, updated the TDS item with the empty values. When deployed the TDS package via Octopus tool, we did not see the change in sitecore. But when we update to some values, we are able to see the changes in sitecore.

    Note: This does not happen when we manually install the package.

    Appreciate your help !

    • sholmesby says:

      What are you using to install the package from Octopus Deploy then? Sitecore.Ship? Sitecore Package Deployer?
      The issue you describe is with Sitecore’s Update Installation process…where if a Standard Value field is left blank, Sitecore would typically leave this unchanged during the installation.
      In TDS 5.7, TDS adds a special PostStep to actively push the blank value. So that’s included in the Update Package.

      I’d recommend you update to TDS 5.7 to get this new feature if you don’t already have it.
      The Sitecore Package Deployer will correctly run the post step, as will the Update Installation Wizard…. I’m not sure about Sitecore.Ship though.
      Thanks

  2. Lan says:

    Thank you for the response. We are using sitecore.ship to deploy the package.

  3. Aly says:

    Thanks for the post on field level deploys (FLDs). When using FLDs, our team has found that the fields that are set as DeployAlwaysFields in TDS get installed in upper life cycles, but they don’t always get published. In troubleshooting this, we noticed that the Revision and Updated fields do not get installed, so think that may be why the publish doesn’t always occur. Have you come across any similar issues when using FLDs?

    • sholmesby says:

      This is a great point. I haven’t looked into it, but that does make sense, as the Revision and Updated fields aren’t touched during Field Level Deployments.
      I will ask around to see what I can find.

Leave a Reply

Your email address will not be published. Required fields are marked *