javascriptdynamics-crmdynamics-365crm-ribbon-workbenchdynamics-crm-365-v9

Dynamics 365 Ribbon Workbench Modal Dialog Opens in new Tab


I have a custom button called "Sync Task" added to my Dynamics 365 app using the classic and new unified interface. The custom button is suppose to open a Web Resource HTML page in a Modal Dialog when clicked... but instead opens it in a new tab.

Classic Interface Button

enter image description here

Unified Interface Button

enter image description here

It opens the page in a new tab at the Web Resource location instead. Not sure what I could be doing wrong.

https://game.crm.dynamics.com//WebResources/SyncTaskLoadingPage

My Dynamics Environment

Dynamics 365, version 9.0

My Ribbon Workbench Environment

Ribbon Workbench 2016
Verion: 3.1.177.1
Author: Scott Durow

Button configuration

enter image description here

Action configuration, notice my Windows Mode is set to "ModalDialog".

enter image description here


Solution

  • MSDN says:

    Don’t use this action to open entity forms or web resources. Use the <JavaScriptFunction> (RibbonDiffXml) with a function that uses Xrm.Utility.openEntityForm or Xrm.Utility.openWebResource instead.

    The latest v9 syntax:

    Xrm.Navigation.openWebResource(webResourceName,windowOptions,data)