tag:blogger.com,1999:blog-18939862.post6074213528085697686..comments2023-07-25T01:20:13.916-07:00Comments on Sitecore CMS Blog by Alex Shyba: Friday Gotcha: Sitecore.Data.Items.Item.FieldsAnonymoushttp://www.blogger.com/profile/09553655443086620502noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-18939862.post-16618275202032606802013-04-18T05:07:21.224-07:002013-04-18T05:07:21.224-07:00Hi Alex,
We faced the similar issue. We are using ...Hi Alex,<br />We faced the similar issue. We are using Sitecore 6.5.<br />We define the Field id as a string in the constant and then using itmCurrent.Field[constfieldName] we get the field and if the field is not null then get the Value.<br /><i><br />public const string NoResultsText = "{ID of the Field}";<br /></i><br /><br />This is working on all pages but some how on one page we were not able to get the value of a particular field. when we tried to get the value using index it was working fine but not with the name.<br /><br />In quickwatch we got the .value as "" but data was stored in inheritedvalue.<br /><br />We tried the ReadAll path that also didn't work.<br /><br />Following worked:<br />var field = itmCurrent.Fields[new Sitecore.Data.ID(Globals.Field.NoResultsText)];<br /><br />Can you please suggest if we are missing anything? Why for just one field the approach is not working?Maulikhttps://www.blogger.com/profile/03868995847182919938noreply@blogger.comtag:blogger.com,1999:blog-18939862.post-55481801340529372042011-06-24T13:22:48.208-07:002011-06-24T13:22:48.208-07:00Hi Sean,
As far as I can see, this is still the c...Hi Sean,<br /><br />As far as I can see, this is still the case for the latest version.<br /><br />You can file a support ticket with a product change request via the support portal. I have not found this registered as a feature request yet.<br /><br />Or if you do not have access, contact me at AS at sitecore dot net and I will file it for you.<br /><br />-alexAnonymoushttps://www.blogger.com/profile/09553655443086620502noreply@blogger.comtag:blogger.com,1999:blog-18939862.post-23120775635491703392011-06-23T10:43:31.622-07:002011-06-23T10:43:31.622-07:00Hi Alex,
Quite a "smell" to be honest.
...Hi Alex,<br />Quite a "smell" to be honest. <br />Is this still a case? <br /><br />Thank you.Seanhttps://www.blogger.com/profile/17730097186224999235noreply@blogger.com