Ahoy,
When I attach the below code on the OnLoad event of the form, it creates an infinite loop. The form that the code navigates to does not have the below code on it. Any ideas how to not make this loop? window.open also gets ignored.
function switchContactForm(executionContext) {
var formContext = executionContext.getFormContext();
var formOptions = {};
formOptions["entityName"] = "contact";
formOptions["entityId"] = formContext.data.entity.getId();
formOptions["formid"] = "";
Xrm.Navigation.openForm(formOptions);
};