title: Can't access a new field programmatically on a template in Sitecore
body: <p>my question is basically the same as @Bob Black's <a href="https://stackoverflow.com/questions/3738711/cannot-access-sitecore-item-field-via-api">Cannot access sitecore item field via API</a> but I agree with @techphoria414 that the accepted solution is not necessary and in my case does not work.</p>
  
  <p>In my own words, I have a template <code>Departure</code> that I have been using for about a year now creating and updating items programmatically.  I have added a new field <code>Ship</code> to the template.  When I create a new item the field comes up as null when I try to access it using <code>departure.Fields["Ship"]</code>.  If I step over the line causing the exception then after calling <code>departure.Editing.EndEdit()</code> I can then see the <code>Ship</code> field if I call <code>departure.Fields.ToList()</code>.  If I add the template to a content item via the Sitecore GUI I can see the field and use it, and if I look at a  content item which is based on the template I can see the new field too.  So it is only when I access the template/item programmatically that it is null.  </p>
  
  <p>I have sitecore running on my local machine with a local sqlserver, and publish to my local machine. </p>
  
  <p>Here is my code</p>
  
  <pre><code>String ship = "MSDisaster";
  
  foreach (Language language in SiteLanguages)
  {
      departure = departure.Database.GetItem(departure.ID, language);
      departure.Editing.BeginEdit();
  
      try
      {
          departure.Fields["StartDate"].Value = GetSitecoreDateString(xDep, "StartDate");
          departure.Fields["EndDate"].Value = GetSitecoreDateString(xDep, "EndDate");
          departure.Fields["Guaranteed"].Value = xDep.SelectSingleNode("./Guaranteed").InnerText;
          departure.Fields["Status"].Value = xDep.SelectSingleNode("./Status").InnerText;
          departure.Fields["Currency"].Value = ConvertLanguageToCurrency(language);
          departure.Fields["Market"].Value = ConvertLanguageToMarket(language);
          departure.Fields["TwinSharePrice"].Value = GetPrice(xDep, "twn", language);
          departure.Fields["SinglePrice"].Value = GetPrice(xDep, "sgl", language);
  
          if (!String.IsNullOrEmpty(ship))
              departures.Fields["Ship"].Value = ship;
      }
      catch (Exception ex)
      {
          departure.Editing.CancelEdit();
          log.Error(ex);
          throw ex;
      }
      departure.Editing.EndEdit();
  }
  </code></pre>
  
  <p>So, how do I get the field be picked up?</p>
  
  <p>Thanks,</p>
  
  <p>James.</p>