javascriptdynamics-365common-data-service

Dynamics/CDS Single line of text format options Phone custom telephony provider


TL;DR

Instead of opening this Launch Application window on desktop, I'd like the button to run custom code to open a new tab in my browser or pop window in my browser. Is that possible?

Full Context

In Dynamics and Power Apps there's a Phone option included in the Single line of text format options. This provides a nice user experience to click a phone icon along the text icon to launch a desktop application or phone app on mobile to make a call.

Is it possible to create a a custom action for this phone call button using my own code? Maybe in JavaScript.

"In the web application, fields will be click-enabled to initiate calls using either Skype or Lync if a client for either is installed on your computer. The telephony provider choice is at the bottom of the General tab of System Settings." It's seems the only customization supported are in system settings and it only allows you to define the Skype provider.

enter image description here

Ideally when using Dynamics in browser I would like to click the phone call button and instead of a Launch Application window, give the user a pop up I serve in browser using my own code to handle the phone call action. Is that possible?

enter image description here

I do not want the below to open, instead I want my own code to perform a custom action like open a pop up window in browser or alert dialog in browser. enter image description here


Solution

  • It works exactly that way by default: enter image description here

    You probably set that "Remember my choice for tel links." once in the past. You can change default app for tel: links in Windows settings.

    There is no supported way to run custom javascript by clicking action icon. But this code snippet should do the trick. Run it on form load:

    MscrmControls.FieldControls.PhoneNumberControl.prototype.action = function() { debugger; };