RE: Form Switching in the Unified Interface
Hi, thanks for responding.
I don't see how this is going to work though. The existing script that I am trying to fix uses the Form Names and a Case Statement, as far as I can tell this is the important part that should be doing the form changing.
lblForm is equal to the Name of the form set in a CASE statement, based on the value in a 'Customer Type' field.
I do not have GUIDS for these forms and there are a lot of forms on this entity.
if (Xrm.Page.ui.formSelector.getCurrentItem().getLabel() != lblForm) {
var items = Xrm.Page.ui.formSelector.items.get(); //Get list of available forms from selector.
for (var i in items) { //Loop through the above list looking for the match.
var item = items[i];
var itemId = item.getId();
var itemLabel = item.getLabel()
if (itemLabel == lblForm) { //If the label matches then navigate to that form.
//navigate to the form
item.navigate();
} //endif
} //end for
} //endif
I don't see a way to convert this to something that will work under the unified interface though.