External tool of Visual Studio 2012 to test WCF at client

1. Go to the “Tools” of Visual Studio 2012 and select “External Tools…”

ExternalTools

2. Click “Add” and enter the command to “C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\WcfTestClient.exe”

WcfTestClient

3. Turn on “Enable anonymous access ” for your web application if you want to test WCF by Anonymous

How to quickly build and check your SharePoint CAML Query

Hey, I know this is a simple question: How to build a correct CAML Query and test it before put it into the code in case you don’t know deep about CAML?

Scenario:
I have a task list, with default columns and Types are:

taskcolumns

And, I also have 2 rows with dummy data like this:

AllItems

Now, I want to build the CAML Query, which returns the row math with condition: “Due Date” is “November 21” and “% Complete” is “10 %”. How to build the CAML Query and test it in this case ?

Solutions: Modify view and using SharePoint Manager
1. Modify current view by click to “Modify View” at the Ribbon

ModifyView
2. At “Filter” session, simple type what you need here, it should be easy like this:

Filter_Session
3. Click “Ok” and yeahhhh, your results will display on current view:

Result1

but wait, what I need here is the CAML Query. Where is it ?
And, SharePoint Manager is very powerful tool to help us get the CAML (and many things else). Just open the SharePoint Manager, go to your current view and look at the “Query” at properties tab, copy this, and you will have a correct CAML Query:

 <Where><And><And><Eq><FieldRef Name="PercentComplete" /><Value Type="Number">.10</Value></Eq><Geq><FieldRef Name="DueDate" /><Value Type="DateTime">2013-11-21T00:00:00Z</Value></Geq></And><Leq><FieldRef Name="DueDate" /><Value Type="DateTime">2013-11-21T00:00:00Z</Value></Leq></And></Where>  

SPManager

Happy coding!!!