Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Unanswered

Multiple parameters with Power Apps Host control

(1) ShareShare
ReportReport
Posted on by 73
Hi
 
I'm investigating if we can replace an HTML/Javascript control with a Power App. To do so I would need to pass more than one parameter from Finance to the Power App. Alternatively, I can pass a JSON or some kind of structured string to the Power App, but I would need to be able to build the string programatically because the data is not available in a single table or field.
 
I'm wondering if anyone else has experience with something similar. So far I see 4 possible options, but I am not sure how good they are.
  • I've tried to see if I can write to the PowerAppsHost "EntityId" property programmatically via an event, which seems to be possible. I've not been able to test if I get the value into the Power App, but I have some reservations when it comes to this way of doing it. I'm afraid that there will be something else writing to this property later, or I feel this way of doing it is a bit dirty somehow. I would not expect it to work, but it's just a feeling I have.
  • I found this article describing creating an extension or duplicate of the PowerAppsHost control: https://www.linkedin.com/pulse/expand-dynamics-foscm-power-apps-integration-oleksandr-dudarenko . I guess this is an option, but then it becomes pretty complicated and I'd rather not maintain it. This is part of the reason we want to use the Power App in the first place.
  • I can extend a table with a new field where I programmatically write the value I need to pass to the Power App, but I am not sure when or how to write to the field and if I can keep it updated. It seems like a workaround that I am not sure is feasible. I would like to avoid it if I can.
  • I've found what seems to be official documentation of the Power Apps Host control here: https://learn.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/user-interface/powerapps-host-control . On item 4 under "Host an app from Power Apps on a page" they describe using a "DataMethod". It's not entirely clear to me what they mean by this, but I suppose it similar to a display method. I've tried to use a method in the property "Entity ID Method", but I always end up with an error saying that the method cannot be found on the data source. I've tried using my own table as a data source, but mainly I want to extend some standard tables like CustTable. I've tried that as well, but with the same error. I am not sure if the method must be on the configured data source. It would be better if it didn't have to be. Experimenting with this eventually caused a problem crashing IIS Express with an exception "Attempted to read or write protected memory", which I spent several hours to get rid of.
So I'm wondering if anyone has some thoughts on this, and possibly other ideas. I was also hoping that I could get some help when it comes to the syntax and how to use the "Entity ID Method" as described in the last bullet point. If I can use this property to pass a computed value to my Power App, this seems like the correct way to pass more than one parameter.
 
Thank you, and best regards!
 
  • CU27120328-0 Profile Picture
    CU27120328-0 on at
    Multiple parameters with Power Apps Host control
    Challenges when passing multiple parameters with security discovery include protecting structured string generation and using JSON, to efficiently manage data integration while raising concerns about the complexity and reliability of these approaches.
  • Multiple parameters with Power Apps Host control
    What type of form is it?
    In my experience, I usually pass a key to my app and then fetch additional data in F&O as needed. Creating a JSON directly in the form seems a bit cumbersome.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,405 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,455 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans