How to execute Javascript from button click on d365 F&O - microsoft-dynamics

I need to know if it's possible to execute Javascript from a button click on d365 F&O. If so, how to do that?
I'm needing to call a URL that is only available inside of our customer's local network - it's not available over the Internet. So, I'm thinking Javascript is my only option. Not sure if this is possible in d365. Any help would be great.
TIA!

Related

Auto refresh Tableau online dashboard using "Auto refresh" Chrome extension

I've created a view in tableau online using a live connection. I want to the page to refresh automaticly every 10 minutes. It can only be done by pressing manually the refresh button in the dashboard/view in tableau online, refreshing the browser page wont refresh the dashboard. I saw a tableau discussion with this tip: "Tip: To continually refresh a view, in the <head> section of the web page, add <meta http-equiv="refresh" content="#">, where # is the number of seconds between refreshes." How can I do this? Can this be done in tableau online?
As a second option I can add parameters to the dashboard URL to fix this issue. I saw this in this discussion: https://community.tableau.com/thread/289924 At least the part ":refresh=yes" had to be added to the URL. Since I'm totally unknown in this area I was not able to fix this. Where and how I need to add this to the url so this will permantly works?
I'm also open for other suggestions.
There are a couple of ways you could approach this, which one you choose will depend on your situation, scale, and available resources.
Option 1: Embed with meta tag
This is the first option you were describing. In order to do this, you will need to embed your dashboard into your own custom separate webpage. You can get the embed code from the share button on any dashboard and can customize it using parameters and the JavaScript Embedding API. The meta tag you mentioned would then go in the header of your custom webpage where you are embedding the dashboard. So it would look something like this:
<html>
<head>
<meta http-equiv="refresh" content="600">
</head>
<body>
<script>
// Your embed code from the dashboard here
</script>
</body>
</html>
You would also want to make sure to include the :refresh tag you mentioned so you always get the latest data.
Pros: Anyone can open the page and have an auto-refreshing dashboard without installing anything.
Cons: You will need to have some form of a webserver to host your custom page. Requires some coding. Hard to scale up the number of dashboards.
Option 2: Chrome Extension
This is the second option you were describing. In this case, a chrome extension in the browser is refreshing the page for you. That means you don't need your own separate webpage. However, it will only work on the browser you install and setup the extension on. It looks like there are a couple of auto-refresh extensions in the chrome web store you can choose from. You would need to configure them to refresh the page, again make sure to include the :refresh tag on the url.
Pros: Don't need a separate webserver. No coding. Easy to scale for multiple dashboards.
Cons: Only works for the browser that the chrome extension is installed on.
Option 3: Dashboard extension
One option you didn't mention but I think is the best would be to use a Dashboard Extension. Dashboard extensions are web apps that you can bring directly into the dashboard. We currently have an Auto-Refresh extension in the gallery built for just this purpose. Once you've downloaded it simply open your dashboard, drag in a new extension object, select the downloaded file and configure for 10 minutes.
Pros: Don't need a separate webserver. No coding. Easy to scale for multiple dashboards. Anyone can open the dashboard and have it auto-refreshing without installing anything.
Cons: Auto-Refresh only works with 2019.4+.
Hope this helps!

How to download the multiple bokeh images as a single report

My application is hosted on Django and one of the html pages shows multiple bar graphs which are drawn using Bokeh. I know we can download each graph separately by using SaveTool icon which comes with Bokeh.
Now my requirement is I want to have a export button in the page, when I click on export button, all the images should be downloaded in a single pdf file or any other format what ever is the easier option to implement.
Please guide me how can I achieve this?
Thanks In Advance.
If this is a Bokeh server application, you could use the export_png function. However, it sounds like it is a Bokeh server application, in which case there is nothing built-in for this. It looks like there is a JavaScript API for screen capture. So you could try using that API in a CustomJS callback for a Button. Note that for security reasons that API will make make users provide active consent every time before allowing a screenshot to be taken.

How to launch IE from C++ code and be able to get html data after web page is changed

Here is my problem:
I am about to implement a method (C++),with an URL argument as parameter, what this method do is to launch the default browser of windows,and visit the url; this URL leads to an page, user of this program have to fill in some info in this page,and submit, then it jump to result page, and my method need to read and analyze this page data.
I know how to launch an browser like IE , but how to:
read page data to my program?
how my program know the page in browser is updated?
Maybe I should just write a web browser inside my program?
Looks like you want to do the IE browser automation. In which you want to launch the IE and try to fetch data from the web page.
With only C++ you can open the IE browser using shell and open the URL but you will not be able to fetch the data to your application.
I suggest you to check the documentation for Selenium Web driver.
I check and find that currently no any framework available for C++.
If you are available to use C# or JavaScript than it can help to solve your issue.
Reference:
Programming Languages & Frameworks
If you are available to use VBA than you can also refer link below for IE automation using VBA.
(1) Automate Internet Explorer (IE) Using VBA
(2) IE (Internet Explorer) Automation using Excel VBA
(3) VBA Internet Explorer Object

How to measure the total amount of time my React Native app gets used

I am about to launch a beta version for my react native application, and I want to get information on how much time users stay on my app, and actually use it, how frequently they enter it etc. That would help giving me feedback. Also could be useful to know which pages get used the most. Is there such a thing that exists for that?
You may use analytics in your project. Google Firebase provides analytics. But I use Appcenter Analytics for my app. You can add custom events as well to track which page the user has opened or to find whether the button was clicked by user. Here is a screenshot from Appcenter dashboard.

Openeing a youtube search via a link in an embedded IWebBrowser2 control fails

I have a simple IWebBrowser2 browser in my application like this one sample.
We use this browser control for a research in our application to search for address information. The user may click on a button to perform a selective search for given keywords in the address and the result is shown in this browser control.
For example we execute a YouTube search for
https://www.youtube.com/results?search_query=test+video
I can copy the link into a browser (Chrome, IE, Edge) and the search is executed.
But from within the embedded Control the search shows the following text:
Google Sorry...
We're sorry...
... but your computer or network may be sending automated queries. To protect our users, we can't process your request right now.
See Google Help for more information.
The help links are not useful, and the problem arises only to searches on Youtube from within the IWebBrowser2. No Captcha is shown. We use AV and Firewall software... so something from YouTube/Google don't like browsing from an IWebBrowser2.
Hint: If you want to use the sample code form CodeProject you should thet ES_AUTOHSCROLL for the URL edit control. Otherwise you will not be able to enter a long search URL.
Set the agent field of the http query header to emulate a known browser.