cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
not_a_thing
Helper I
Helper I

Canvas App - reference to the environment

Hello everyone!

 

I have a canvas app that shows a list of contacts.

I want to be able to show the contacts in a separate window.

Learning about the Launch function, I placed a button linked to each gallery item for opening a contact with dirty [environment url in plain text] concatenated with [app id] which is always the same, so it's kinda OK and ThisItem.contactid

 

 

 

 

[environment url] & [app id] & ThisItem.contactid

 

 

 

 

 Everything looks great, but the moment I'll deploy the solution with this app to another environment, it will crash, because environment url will change.

 

Can I put a relative link in Launch? I tried to play with

Launch("/providers/Microsoft.PowerApps/apps/...)

to no avail.

Or can I somehow open a contact in Dynamics by referencing to it directly without the Launch-function?

Open the contact in a form in that app is not good enough.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Cooper01
Continued Contributor
Continued Contributor

Not sure about relative links in Dataverse but I have used an environment variable to hold the environment URL so you'd set that at the environment level.

View solution in original post

2 REPLIES 2
Cooper01
Continued Contributor
Continued Contributor

Not sure about relative links in Dataverse but I have used an environment variable to hold the environment URL so you'd set that at the environment level.

not_a_thing
Helper I
Helper I

Though I'd love to be able to solve this without "jumping" outside of the app, I gave environment variables another look, and it could solve the issue.

Specially this article helped: https://crmchap.co.uk/working-with-environment-variables-in-canvas-power-apps-and-power-automate-flo...

And another topic created on this forum: How to read Environment Variables in PowerApp

 

Well see how it goes when I deploy this from dev to test 🙂

Helpful resources

Announcements
Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Government Carousel

New forum: GCC, GCCH, DoD - Federal App Makers (FAM)

In response to the unique and evolving requirements of the United States public sector, Microsoft has created Power Apps US Government.

Users online (4,711)