What I am trying to do is alter a lookup dialog to default to a specific entity type on a lookup dialog.
On the Connection form I check the record1id entity type and try and set the defaulttype attribute on the record2id
The closest I have come to acheiving this by the following:
document.getElementById("record2id").setAttribute("lookuptypenames","incident:112:Case");
document.getElementById("record2id").setAttribute("lookuptypes","112");
document.getElementById("record2id").setAttribute("defaulttype","112"); // Case
Xrm.Page.getControl("record2id").setDefaultView("{9AC51863-58C7-49A0-ADCC-AFD9A4C3EE59}");
The above limits the lookup dialog type selection to only incident (not quite what I want but I was trying a "no nonsence" approach!) but the view stays on contact even though I try and set the default view to something else!
I am basically running out of ideas on how to hack this thing so any other ideas would be great.
Thanks