cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

How to insert API call data in CDS Entities using custom code in Power App Portal

Hi Experts,

 

I am trying to embed one open-source interface in my portal, which uses the Iframe to embed it in the portal and the logged-in user will interact with that embedded page and post-interaction it is going to give result in JSON format. We are trying to get the result data and store it in CDS entities. Below is the interface which we are embedding to the portal:

https://infermedica.com/

 

Could you please help me to direct in the right direction to use it in the portal? 

Few Queries:

1. How to store the output data in CDS Entities ( i.e Assesment_Data)?

2. How to relate it with contact entities or any other entities which is a parent of "Assesment_Data" entity.

3. Is there a way to get the result data using javascript/jquery/ajax/Web API etc.

 

Please help me with this requirement.

 

Thanks,

Amit

1 ACCEPTED SOLUTION

Accepted Solutions

thanks, it is clear what you need, but not clear how you will get the data back from the iFrame, I am assuming you got that part covered, am I right?

 

once you have the data back I think you can try the following different approaches:

 

1 - call a flow passing the data returned + the logged in user, you can get that via Liquid using {{ user.id }}

 

2 - having an entity form with everything hidden, including the submit button, via JS you can set the data into a field and force the button click

 

3 - going more custom using a companion app or portal actions approach: 

https://community.dynamics.com/365/b/udssystems/posts/https-uds-systems-blog

https://colinvermander.com/portal-companion-app/

 

4 - Microsoft will be releasing a CRUD API somewhere in June (in preview mode), so you can always wait until we have that so you will be able to perform the operations against your CDS data

 

 

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.




If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Power Apps Portals Super User


Oliver Rodrigues


 

View solution in original post

5 REPLIES 5
OliverRodrigues
Super User II
Super User II

I am bit confused with the mix of embedding an iframe and using API, I think you should either go for one or the other

 

if you want the data in your CDS you need to integrate with that system, have you checked if there is a connector in Flow/Power Automate to help you on that?

 

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.




If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Power Apps Portals Super User


Oliver Rodrigues


 

Anonymous
Not applicable

Hi @OliverRodrigues 

 

Sry for not being clear, but basically what I want is when I embed the

<iframe id="hf-iframe" src=" https://covid19.infermedica.com/en/?header=false&language_selector=false"></iframe>

interface in my portal, then at the end of the user assessment, it returns JSON data. which I want to get and insert it in my CDS entities.

And Also while inserting the data to an entity, how can I link that record to logged-in user?

 

Please let me know if that clears your doubt.

 

Thanks,

Amit

thanks, it is clear what you need, but not clear how you will get the data back from the iFrame, I am assuming you got that part covered, am I right?

 

once you have the data back I think you can try the following different approaches:

 

1 - call a flow passing the data returned + the logged in user, you can get that via Liquid using {{ user.id }}

 

2 - having an entity form with everything hidden, including the submit button, via JS you can set the data into a field and force the button click

 

3 - going more custom using a companion app or portal actions approach: 

https://community.dynamics.com/365/b/udssystems/posts/https-uds-systems-blog

https://colinvermander.com/portal-companion-app/

 

4 - Microsoft will be releasing a CRUD API somewhere in June (in preview mode), so you can always wait until we have that so you will be able to perform the operations against your CDS data

 

 

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.




If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Power Apps Portals Super User


Oliver Rodrigues


 

View solution in original post

Anonymous
Not applicable

Hi @OliverRodrigues 

 

It helps in understanding that currently there is no CURD API available, but the options which you mentioned will help me to decide the approach. And yes, I am able to get the data from Iframe.

 

1st Option: This is the approach that you are referring to? (https://rajeevpentyala.com/2020/02/09/power-platform-pass-json-collection-from-canvas-app-to-power-a...)

2nd Option: I was thinking of this option but was looking for a better option (like CURD API).

3rd Option: I will go through this.

 

Thanks,

Amit

1st option would be more like this one: https://readyxrm.blog/2019/12/28/trigger-power-automate-flows-from-power-apps-portals/

 

remember that Portals is not a canvas app, so you can't use the one you mentioned




If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Power Apps Portals Super User


Oliver Rodrigues


 

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (2,752)