Greetings,
Using Visual Studio 2010, I've created a list definition + list instance based on a SharePoint calendar. In the Schema.xml file, I've defined a custom view for the list that filters the calendar events based on the category field and set it as the default view.
The view deploys to SharePoint 2010 and correctly gets set as the default, however the query parameters are getting stripped out.
In Schema.xml, the query looks like this:
<Query>
<Where>
<And>
<DateRangesOverlap>
<FieldRef Name="EventDate" />
<FieldRef Name="EndDate" />
<FieldRef Name="RecurrenceID" />
<Value Type="DateTime">
<Month />
</Value>
</DateRangesOverlap>
<Eq>
<FieldRef Name="Category" />
<Value Type="Text">My Category</Value>
</Eq>
</And>
</Where>
</Query>
And when I inspect the caml in the deployed view it looks like this:
<Query>
<OrderBy>
<FieldRef Name="EventDate" />
</OrderBy>
</Query>
So how do I get this to deploy properly and not strip out the query?
Thanks,
Greg