3

We are working on application that will use Odata to query page metadata and with metadata we need some page information also so we are using following syntax:

var metas = cds.CustomMetas.Expand("Page").ToList();

the above query returns the error:

The property 'ComponentPresentation' does not exist on type 'odataService.CustomMeta'. Make sure to only use property names that are defined by the type.

Also, the odata query that is formed with above code, if I run that in browser it works without any issues; it is only when I perform the query through code that is when I am getting the error.

Can you please suggest what am I missing?

1 Answer 1

1

You can find some example for accessing metadata in below link.

http://yatb.mitza.net/2012/11/tridion-odata-whats-possible-and-what.html

5
  • 1
    Raj, can you expand on your answer some so it isn't just a link to an outside source? Feb 25, 2014 at 7:44
  • @GlennStevens i have mentioned link which has example from related to his questions, so they might help him. let me know if there are any rules, i will update/remove it.
    – Raj Kumar
    Feb 25, 2014 at 8:51
  • Raj, it is fine to have links in your answer but it is better to have some context around the link including the most relevant information from the location you are linking to. See the item 'Provide context for links' at the following page for more information: tridion.stackexchange.com/help/how-to-answer Feb 25, 2014 at 11:37
  • @RajKumar Thanks for your input. I checked the link and the limitations suggested in the link are more to do with the where conditions and other part is I can't use property of inner data unless I use expand to get the inner data. However, in my case I am not doing any such things, I am just performing expand of Page on metadata. Also please note, the odata query that is formed with above code, if I run that in browser it works without any issues; it is only when I perform the query through code that is when I am getting the error. Please provide your input.
    – Hiren Kaku
    Feb 25, 2014 at 21:26
  • @Haren Please update you question with the input you just provided in comment above. it would be easy for others also to look into your question and answer it.
    – Raj Kumar
    Feb 26, 2014 at 3:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.