Changing MSCRM Form order dynamically through javascript
Below code is working in MS CRM 2013
we can navigate from one main form to another main form through javascript as below code snippet.
Using index of the form type:
we can change the form type based on the index. In the above image Information index is 0 and Case index is 1.
Code:
var formName = Xrm.Page.ui.formSelector.getCurrentItem();
var labelText = formName.getLabel();
Xrm.Page.ui.formSelector.items.get(1).navigate(); //Here I am navigating to Case form
Using index of the form Form ID:
we can change the form type based on the Form Id.
Code:
var formName = Xrm.Page.ui.formSelector.getCurrentItem();
var labelText = formName.getLabel();
var formID="f658c846-f74c-459b-b591-b97558958106";
Xrm.Page.ui.formSelector.items.get(formID).navigate(); //Here I am navigating to Case form
Comments
Post a Comment