Forum Discussion
Tarundeep
Nov 30, 2018Copper Contributor
Can I fetch ContentType as one of the selected fields in pnp SPFX Caml query
User will provide a list of URL's from Site pages, then I need to know the ContentType of each Site Page provided by the user. Is this possible, I am trying to do something as below but it's not show...
Alexseliv
Sep 11, 2022Copper Contributor
To be able to use item.ContentType.Name or comparison item.ContentType.Name == "Some contentype", ViewFields should contain:
<FieldRef Name='ContentTypeId' />
Thanks to this blog:
https://gp23.com.au/2017/03/28/csom-contenttype-and-caml-queries/
<FieldRef Name='ContentTypeId' />
Thanks to this blog:
https://gp23.com.au/2017/03/28/csom-contenttype-and-caml-queries/