Hi,
In theory - you could add an two value optionset, with the values Account and Contact, then add a JavaScript webresource with something like:
var crm= crm || {};
crm.myForm= {
onload : function () {
// Register onchange handlers
Xrm.Page.getAttribute("new_lookuptype").addOnChange(crm.myForm.onLookupTypeChange);
crm.myform.onLookupTypeChange();
},
onLookupTypeChange: function () {
var attributeValue = Xrm.Page.getAttribute("new_lookuptype").getValue();
Xrm.Page.getControl("new_accountid").setVisible(attributeValue );
Xrm.Page.getControl("new_contactid").setVisible(!attributeValue);
}
};
Then add an onload webresource event that calls crm.myForm.onload
hth