web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Blogs / D365 Demystified / [SOLVED] Navigating URL fro...

[SOLVED] Navigating URL from Ribbon’s custom button in Dynamics for Phones app

Priyesh Profile Picture Priyesh 7,396 User Group Leader

Syndicated from - https://d365demystified.com/2019/06/27/solved-navigating-url-from-ribbons-custom-button-in-dynamics-for-phones-app/

So, with all the buzz about the transition to the Unified Interface, I came across this issue where Url Command Action doesn’t work on the Dynamics for Phones app for a custom button

urlAction

Scenario

I’m Url Command Action in the Ribbon Workbench’s custom button to navigate to a PDF User Guide stored on the SharePoint for users to simply click and navigate.

classicUI

unifiedUI

Now, this works fine on the classic Web UI and Unified Interface Web Application.
targetPDF

 

But doesn’t work on the Dynamics for Phones app! Nothing happens when you click on it.

guideButtononPhone

Workaround/Resolution

So, the workaround is, using JavaScript method to navigate the URL as shown below

  1. Write a JS file which uses Xrm.Navigation.openUrl(<link>); instead.
  2. Remove the URL Action Command and use JavaScript Command instead in the Ribbon Workbench.
    useJSAction
    jsFuntion
  3. Sample Code here
    oAccountFormCustomization = {
    guideButton: function()
    {
    Xrm.Navigation.openUrl(“https://<yourlink/>&#8221;);
    }
    };
  4. And this should work on your phone app when you click the button there and it should successfully navigate to the said URL (my SharePoint Document in this case)
    docAppears

 

Related

Here are some of my other posts that are related to custom ribbon button –

D365 Ribbon Button shortcut to open a Document in SharePoint Online

Fix Ribbon icons on the Unified Interface in D365 CE

Hope that works!!


This was originally posted here.

Comments

*This post is locked for comments