2

I searched around the internet (and on this stackexchange site), but didnt find any answer.

I wrote a small C# application that should retrieve some data via the SOAP webservice of a sharepoint server (just a one-way read access) and further process them. So far, it works great, except one small thing: the response contains tons of additional metadata fields:

ows_MetaInfo
ows__ModerationStatus
ows__Level
ows_Title
ows_ID
ows_owshiddenversion
ows_UniqueId
ows_FSObjType
ows_Created
ows_FileRef

I specified the fields I'm interested in via ViewFields, but still all those useless (at least for me) fields are returned, which creates quite an unnecessary overhead.

Is there a way to get rid of these? Thanks in advance!

1
  • Philip...did you ever find an answer to this?
    – jpollar
    Feb 4, 2016 at 17:10

1 Answer 1

2

In SP2007 the best you can do is setting the queryOptions of the GetListItems to:

<QueryOptions>
   <IncludeMandatoryColumns>FALSE</IncludeMandatoryColumns>
</QueryOptions>

But it'll remove the fields you listed, but only other required fields.
In SP2010 you can set it to

<QueryOptions>
   <IncludeMandatoryColumns>FALSE</IncludeMandatoryColumns>
   <ViewFieldsOnly>TRUE</ViewFieldsOnly>
</QueryOptions>
6
  • Sadly, that doesnt work. Could the fact that I'm using Sharepoint 2007 be the reason? Apr 16, 2012 at 19:59
  • Yes, that was added in 2010 Apr 17, 2012 at 4:08
  • Thanks for your answer. Do you know if theres any possibility to do the same with SP 2007? Apr 17, 2012 at 11:59
  • Sorry last comment was wrong, It's ViewFieldsOnly which is new in 2010. IncludeMandatoryColumns is in 2010 but doesn't remove fields which SharePoint thinks are important, but it gets rid of required fields not included in your ViewFields, so if you want minimal response you should include it, but there is no way in SP2007 to get rid of the fields you listed in the question Apr 17, 2012 at 16:47
  • Ok, so I guess I have to live with it :). Thank you for the details! Apr 18, 2012 at 13:17

Your Answer

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

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