Monday 11 June 2012

CRM 2011- Fetch XML dependentAttributeName error

I kept getting what I thought was a random [InvalidOperationException: dependentAttributeName must be specified] error message when I was doing some 'Deep Queries' on a grid on a CRM Form. I had done a few of these before and was stumped as to why it wasnt working this time. Couple of things to check which helped me out in the end:
1.)Ensure that any relationships you have entered are the correct ones and spelt properly

2.)In the fetch xml of the view you are using to look up the deep query, ensure that the link-entity(s) are used and mapped correctly right up until the 2nd last entity in the chain (last one is done automatically). Also note that if you dont put any link entities at all,it will error out :)