Wednesday, 20 February 2008

Advanced Find in CRM 4.0 - Same entity relationships not allowed?

I'm currently having some trouble upgrading some functionality used in CRM 3.0 to CRM 4.0
Basically the model is..

  • a contact has a group of interests
  • these interests exist in a seperate entity
  • the contact is connected to an interest through a link entity (contact-interest). (basically making a many to many)

The user can then use an advanced find to search for all contacts with a certain set of interests. For example:
  • Contact 1 has interest A and interest B
  • Contact 2 has interest A


The user wants to find contacts with interest A and interest B

An advanced find with contacts with contact-interests where interest equals and selecting A and B in the lookup serves as an OR and finds both contacts.

An AF where interest equals A and a seperate line for interest equals B finds neither (the interest lookup on contact interest can not be both).


So, the only way to get this to work is to have two contact-interest lines....

Find Contacts
Contact Interest (Contact)
Interest = A
Contact Interest (Contact)
Interest = B


This works in CRM 3.0 as it will find contact 1 who has both.

Problem is, CRM 4.0 doesn't allow you to create duplicate clauses to the same entity as above and comes up with the following error:

"The relationship you are adding already exists in the query"

Does anyone know of a way round this? It looks like the CRM team have chosen to block this and I'm not sure why!