Skip to content

Instantly share code, notes, and snippets.

@melamriD365
Created September 12, 2022 14:06
Show Gist options
  • Save melamriD365/2ad978a451789c1f29af98a9c13cbe7d to your computer and use it in GitHub Desktop.
Save melamriD365/2ad978a451789c1f29af98a9c13cbe7d to your computer and use it in GitHub Desktop.
Deep link a Model Driven App to open on a specific tab (form tab)
var MEA = window.MEA || {};
var accountForm = MEA.accountForm || {};
(function () {
this.OnLoad = function (onLoadContext) {
var formContext = onLoadContext.getFormContext();
var extraParameters = Xrm.Utility.getGlobalContext().getQueryStringParameters();
var tabName = extraParameters["tab_name"];
if(tabName != undefined){
var defaultTabObj = formContext.ui.tabs.get(tabName);
defaultTabObj.setFocus();
}
};
}).call(accountForm);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment