Tuesday, 31 July 2012

Advanced find and many-to-many relationships

Here's one that caught me out for a little while today. Earlier today I set up a new entity called Media Code with a many-to-many relationship with Sales Literature. I put in my required settings, saved it, and then went about my daily business.

Later on in the day I want to create a Fetch Query to locate any Sales Literature that is linked to a particular  Media Code. So, in typical developer mode and having forgotten everything I did earlier in the day, I open up an advanced find, select Sales Literature from the list, look to filter by Media Code... but low and behold there's no Media Code option in the related list?!? To double check I haven't gone insane I change my advanced find and select Media Code from the list of entities... and to my complete amazement Sales Literature is there right in front of my eyes, as bold as brass, under related entities.

What on earth is going on at all I hear you ask! Well, today I learnt something new about Microsoft Dynamics CRM and it was this here:

I did not know until today that this option also blocks it from the advanced find. Shock horror!

Hopefully this saves somebody else 30 minutes of their day pulling hair out of their head...

No comments:

Post a Comment