Relationship name different to relationship entity name

Mar 28, 2012 at 10:11 PM

I am getting the error Entity Relationship <relationship name> was not found in the metadata Platform as described in this blog ( because the relationship name is different to the relationship entity name. I've tried entering both the relationship name and relationship entity name into the cmd but still doesn't work. Is there any way around this?



Mar 29, 2012 at 11:10 AM


Sometimes even though it displays the name on the screen it can be the wrong name (too long).  Check the views (Not Tables!), find the view that represents the relationship and use the name of the view.  It's probably just a truncated version of the name.  Use that and see how you go.



Mar 29, 2012 at 8:59 PM

Hi Matt,

Thanks for your response, I had a look at the views and used the exact view name. However it still doesn't work, it gives me the error:

The entity with a name = 'oa_moderationunitstandardid' was not found in the metadataCache.

It's funny because this isn't the entity name, this is one of the linking m2m keys so perhaps I've got the format for the cmd wrong? I used the following:

CRMAssocManyToMany.exe import "server" "organisation" "m2m entity" "m2m key 1" "m2m key 2" "file location.csv"

Have I got the format correct?



Mar 29, 2012 at 9:09 PM

Ok, this seems to be a different error to what you were reporting before, double check the field names you are using on the command line.

"oa_moderationunitstandardid" is a field, not the relationship name.... Custom Relationship names would be of the format "<prefix>_<entity1>_<prefix>_<entity2>" or something similar...

Check that field for any abnormalities, perhaps it hasn't been published yet?

Mar 29, 2012 at 9:12 PM

And yes the format looks correct.

Mar 29, 2012 at 9:19 PM

Hi there thanks for the reply. I tried again and carefully copied and pasted in the values but same error. I also made sure everything was published. This is the cmd I'm using (sorry have to replace some values):

CRMAssocManyToMany.exe import "server" "organisation" "oa_oa_moderationunitstandard_oa_assessment" "oa_moderationunitstandardid" "oa_assessmentresultid" "C:\file.csv"

I can't find a way to paste an image but this is what the view looks like:

[] * (All Columns)
[] oa_oa_moderationunitstandard_oa_assessmentId
[] VersionNumber
[] oa_moderationunitstandardid
[] oa_assessmentresultid

The CRM M2M relationship says this:

Relationship Definition
Name* oa_oa_moderationunistandard_oa_assessmentre
Relationship Entity Name* oa_oa_moderationunitstandard_oa_assessment

Mar 29, 2012 at 9:33 PM

Lol, just realise, the format is not correct.  You are putting in the fields names (i.e keys), you should be putting in the logical names of the entities.

From what I can see it will be either:

CRMAssocManyToMany.exe import "server" "organisation" "oa_oa_moderationunitstandard_oa_assessment" "oa_moderationunitstandard" "oa_assessmentresult" "C:\file.csv"

CRMAssocManyToMany.exe import "server" "organisation" "oa_oa_moderationunitstandard_oa_assessmentre" "oa_moderationunitstandard" "oa_assessmentresult" "C:\file.csv"

Mar 30, 2012 at 12:51 AM

Yes this worked using the logical field name! Thanks very much for your help