1

I am using SP 2010 and SPServices. I define CAMLViewFields, CAMLRowLimit and CAMLQueryOptions and still retrieve the system fields like (ModerationStatus, UniqueID,...). Is there any option so that the system fields will not be in the response? Furthermore the field "OutsideDefault" is not contained in the default view and it is not in the response. Is there any way I can retrieve fields which are not in the default view?

$().SPServices({
        operation: "GetListItems",
        async: false,
        listName: "PMO List",
        CAMLQueryOptions: "<QueryOptions><IncludeMandatoryColumns>False</IncludeMandatoryColumns><ViewFieldsOnly>True</ViewFieldsOnly></QueryOptions>",
        CAMLViewFields: "<ViewFields><FieldRef Name='ID' /><FieldRef Name='Title' />"<ViewFields><FieldRef Name='OutsideDefault' /></ViewFields>",
        CAMLRowLimit: 0,
        completefunc: function (xData, Status) {
            $(xData.responseXML).SPFilterNode("z:row").each(function() {
                availableTags.push($(this).attr("ows_ID") + " - " + $(this).attr("ows_Title"))
            });
        }
});
Muhammad Usman
  • 1,366
  • 5
  • 18
  • 33
Stev
  • 416
  • 4
  • 11

1 Answers1

1

You need to use the viewName option, using the view's GUID. It would look like

viewName: "{1848EE72-BC85-4D7D-A85B-D6FF61E61580}",

Another option is to add all of the fields you need to the CAMLViewFields line.

Erin L
  • 136
  • 1
  • 9