An easy way of creating a FetchXml query is to use Advanced Find. (http://<hostname>/ORG/AdvancedFind/AdvFind.aspx)
- Create the query that you wish to use. Bear in mind that some attributes might be missing, you can always add them later manually to your code.
- Run Query, i.e. Press Find
- Type the following in the address bar: javascript:prompt("q:", resultRender.FetchXml.value);
- Hit Enter
- You'll get a window with the query used. Grab it and use it in your code.
Luckily, Microsoft has recognised the productivity gains that this (easily generated FetchXml queries) can generate and has included a button to do this in Dynamics CRM 2011.
No comments:
Post a Comment