Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I use SP web-services to fetch list items (rows).
I want to be able to load all available fields for the list and pick some of them to be returned for each list item. So I use Lists.asmx#GetList to fetch all Fields, pick StaticName from it, and send it to Lists.asmx#GetListItems in <ViewFields>.

Why some fields displayed in GetList doesn't return by GetListItems? (For example 'ContentTypeID' returns well, but '_HasCopyDestination' doesn't).

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

I've had so many issues with what fields do or don't get returned from that method I pretty much just accept it will be broken. Some more info here What does the GetListItems query option IncludeMandatoryColumns do?

Some examples from a Document library:

<Field ID="{4dd7e525-8d6b-4cb4-9d3e-44ee25f973eb}" ReadOnly="TRUE" Hidden="TRUE" Type="Text" Name="Created_x0020_By" DisplayName="Document Created By" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="Created_x0020_By" FromBaseType="TRUE" ColName="nvarchar2"/>

Title field: <Field ID="{fa564e0f-0c70-4ab9-b863-0177e6ddd247}" Type="Text" Name="Title" ShowInNewForm="FALSE" ShowInFileDlg="FALSE" DisplayName="Title" Sealed="TRUE" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="Title" ColName="nvarchar7"/>

You can try filtering out some of the fields that use FromBaseType="TRUE" or Hidden="TRUE" but then again.. maybe you want Created By?

A blacklist would probably work but make sure it is configurable so you can add new ones you find later. :)

share|improve this answer
    
Thanks again. It looks like FromBaseType="TRUE" will opt out all mandatory fields like Modified, Created, etc. Also, you can use static name "Author", instead "Created_x0020_By" to see who created the item. I will filter by hidden==true. –  surlac Dec 24 '12 at 8:18
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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