Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

Lists.GetListContentTypes Method Not Returning "Field" Elements

$
0
0

Hi all,

I am trying to use the SharePoint Lists.asmx service to get the fields from content types on a list. I am able to get the content type back and see the schema, but it does not have the "Field" elements included.

This is the code I am currently using and have tried with custom and out of the box libraries and content types:

Lists listService =newLists();listService.UseDefaultCredentials = true;XmlNode list = listService.GetList(listName);string contentTypeId ="0x0101";XmlNode contentTypeNode = listService.GetListContentTypes(listName, contentTypeId);File.WriteAllText(@"C:\Output.txt", contentTypeNode.InnerXml);

This is the outcome

<ContentTypeName="My content type"ID="0x01018800FEFD82115AA541268E8F8A69560E09E2000FA31C5AD21DB043AE8E107AA6287D04"Description=""Scope=http://sitename/Lists/mylistVersion="5"xmlns="http://schemas.microsoft.com/sharepoint/soap/">

  <XmlDocuments>

    <XmlDocumentNamespaceURI="Microsoft.SharePoint.Taxonomy.ContentTypeSync">

      <SharedContentTypexmlns="Microsoft.SharePoint.Taxonomy.ContentTypeSync"SourceId="2a3a7c98-0443-4a44-9e71-ec39de70a463"ContentTypeId="0x01018800FEFD82115AA541268E8F8A69560E09E2"PreviousValue="false" />

    </XmlDocument>

    <XmlDocumentNamespaceURI="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms">

      <FormTemplatesxmlns="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms">

        <Display>DocumentLibraryForm</Display>

        <Edit>DocumentLibraryForm</Edit>

        <New>DocumentLibraryForm</New>

      </FormTemplates>

    </XmlDocument>

  </XmlDocuments>

</ContentType>

Any thoughts on why I am not getting the "Fields"? They are there in the schema.

Any help would be greatly appreciated.

Thanks,

J.


Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>