1
votes

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

2
I have this same problem, does anyone have the answer to this issue?Rob Hufschmitt

2 Answers

1
votes

Lookups on the Connection form can't be filtered, see here

0
votes

I realize this is digging up a dead post, but your post pointed me in the right direction for a question I no longer have to ask.

This blog post has some slightly different steps in it, perhaps they help?