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
Responsive Resident
Responsive Resident

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
Responsive Resident
Responsive Resident

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

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
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza Winner Announcement

Please join us on Wednesday, July 21st at 8a PDT. We will be announcing the Winners of the Demo Extravaganza!

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

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.

Top Solution Authors
Top Kudoed Authors
Users online (2,774)