1

In Dynamics CRM 2016 I have some buttons in the ribbon that run javascript which use window.open to launch a new window. This works fine on the web browser in desktop mode, but in the Dynamics CRM mobile app it doesnt work. The documentation says:

Dynamics 365 mobile clients also do not support the window.open method.

However, Microsoft gives no alternative.

I notice if I add a button in Ribbon Workbench and set the command to "Open URL" and put in a web address, it works fine and opens on the mobile app. The XML is:

<Actions>
    <Url Address="http://google.com" WinMode="0" />
</Actions>

I assume that XML then translates into Javascript on the app. I wondered if there is a way of using Javascript to open a URL on the mobile app?

I have tried window.open and location.href to no use. In this case javascript is more ideal as I am passing a bunch of parameters to the URL that arent visible by the options in Ribbon Workbench.

Dean
  • 360
  • 1
  • 10
  • 27

1 Answers1

1

It looks like it is not possible to use JavaScript to open a window on CRM for Mobile. However, have come up with a rough alternative.

Using the parameters available in ribbon workbench it is possible to create an "Open URL" command which passes the OrgName, EntityType and PrimaryID. I send these values to an ASPX page which connects to the CRM web service where I can then get the rest of the values I need, and then from there Response.Redirect to the URL I needed to go to.

Dean
  • 360
  • 1
  • 10
  • 27