microsoft / PowerApps-TestEngine

MIT License
100 stars 30 forks source link

[Feature]: Power Apps Portal Provider - Update Connection References #354

Open Grant-Archibald-MS opened 1 month ago

Grant-Archibald-MS commented 1 month ago

Is your feature request related to a problem? Please describe.

After a solution is imported Connection References may not be related to a connection. Dependent Power Apps and Power Automate Cloud flows may not work as expected.

Describe the solution you'd like

Provide a Power Fx command that will allow connection references in an environment to be updated with connections for a user

Describe alternatives you've considered

Specify the connection id as part of solution import or use Power Apps Portal to import the solution which will create and prompt user to create connections if they do not exist

Additional context?

No response

Grant-Archibald-MS commented 1 month ago

Implemented in portal sample.

Uses new Power Fx function TestEngine.UpdateConnectionReferences() to do the following:

  1. Query connections in an environment
  2. Obtain the Environment Instance Url
  3. Query Connection References using the Dataverse API
  4. Update Connection References to connectionid using Dataverse API