Hi there,
I am new to the Dynamics 365 customization.
I have recently received a request from a client that he wants to display data from an external API within
the Account or Opportunity form of Dynamics 365. The solution must be easily deployable because he wants to sell it
to other customers who might have the same need. Just for a clarification easily means, a non-technical
person could install the solution to his instance with just administrator rights.
I was thinking to use websource or iframe, however I might have the API tokens within the javascript code
which it will be a major security concern.
Could you please suggest me how should I continue with this task?
Thanks a lot for your support.
Hi Gee1463,
Hope those would help you.
And I look forward to your feedback. :)
Regards,
Clofly
If you had found any answer helped, please kindly mark as verified to close the thread, it would be really appreciated.
Thank you so much for your details. I really appreciate this. I will try this out and let you know.
Hi Gee1463,
> Steps for deployment if we use flow.
1. In https://make.powerapps.com/, switch the environment to the environment that you use for importing data from external API, create a new solution.
2. In the solution, create a flow component, and set up your flow in flow center.
3. Back to solutions list, export the custom solution. (It depends on your own business requirement that exporting the solution as managed or unmanaged. See differences between them here.)
4. In powerapps page of your customer, import the solution you built, it will ask customer to connect to their CDS account.(Dynamics account)
5. Now customer can run your flow by opening your solution.
> How to send data from the plugin to the web resource?
Plugin will only be triggered when an account is created or updated, and it will just fetch data from external API.
Therefore, you need to create a custom entity to save data from the external, then retrieve records of the custom entity with Web API and render result in web resource.
(It also applies with the flow way.)
To sum up, either with flow or plugin:
1. At lease a custom entity is required to be created to store external data as entity records.
2. Create a solution to add the flow or plugin, then customers will able to run functionality by importing the solution directly.
Regards,
Clofly
Hi Clofly,
Thanks for your answer.
Right yes. We need to make a call to an external API from Dynamics 365 and the data should be represented within Dynamics.
I looked at the suggestion and the documentation you provided and it could work.
However, how can I send data from the plugin to the webresource? The data from the plug in are that retrieved data from the API and I will need to display them on a scrollable list view in the websource. Can it be done like this?
Another question, how can the solution that you suggested be deployed to customers? Can it be a package and just install it? Like an installation wizard or something?
Thanks a lot for your contribution.
Hi Gee1463,
So the real direction is from external API to Dynamics CRM instead, right?
If so, you could create a HTTP trigger in flow to fetch data from the external API and send them to CRM with CDS connector.
https://d365demystified.com/2020/04/07/make-http-request-from-flow-in-power-automate/
(The flow will run recurrently.)
In addition, it is also supported to get access to web resources by a plug-in, therefore, we can trigger the plug-in on creation or on update of Account entity.
Regards,
Clofly
Hi Clofly,
Thank you so much for your answer.
The data that we will retrieve from the external API should be displayed in the Account form of Dynamics CRM.
It will be a list of text and URL entries.
I think the suggestions above would be the perfect solution if I would like to retrieve data from Dynamics to external source.
Please correct me if I am wrong..As I said I am new here :)
Again thanks for your answer.
Hi Gee1463,
I would suggest you HTTP Request trigger to fetch data from Dynamics 365 and display to the external.
Then securing the endpoint with necessary validations:
https://www.about365.nl/2018/11/13/securing-your-http-request-trigger-in-flow/
https://demiliani.com/2020/06/25/securing-your-http-triggered-flow-in-power-automate/
Regards,
Clofly
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,228 Super User 2024 Season 2
Martin Dráb 230,056 Most Valuable Professional
nmaenpaa 101,156