I am trying to dynamically generate a view for a lookup field on a form with javascript. I followed the code in the sdk to do this which includes this:
fetch xml:
"<link-entity alias='accountprimarycontactidcontactcontactid' " +
"name='contact' " +
"from='contactid' " +
"to='primarycontactid' " +
"link-type='outer' " +
"visible='false'>" +
"<attribute name='emailaddress1' />" +
"</link-entity>" +
layout xml:
"<cell name='accountprimarycontactidcontactcontactid.emailaddress1' " +
"width='150' " +
"disableSorting='1' />"
However, when I try to do this with a custom entity relationship, I get an error message saying, "A primary entity column cannot have a dot in its name". Here are the snippets from my code:
fetch xml:
"<link-entity alias='employeetype' name='gcu_employeetype' from='gcu_employeetypeid' to='gcu_employeetypecodelkp' visible='false' link-type='outer'>" +
"<attribute name='gcu_employeetypedescription' />" +
"</link-entity>" +
layout xml:
"<cell name='employeeType.gcu_employeetypedescription' width='300' disableSorting = '1' />" +
If I comment out the line in the layout xml for the columns from the related entities, the code works fine. I only get errors when I include these columns. I've tried using different aliases for the link-entity, but it still does not work. Any help on what I am doing wrong would be appreciated. CRM 2011 On Premise.