Just use following steps and enjoy.....
- Use the advance find of MS CRM;
- Use the graphical user interface to define your query;
- Run the query (click on Find button) ;
- Press CTRL+N, this will create a new IE window but will keep the context;
- Replace the url in the address bar
- javascript:alert(resultRender.FetchXml.value);