cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Pchan3
Advocate I
Advocate I

Cross environment deployments

Hi All,

 

We are in the process of developing some canvas apps in our organisation.

 

We are at the stage for one of our apps to deploy to a test environment, so that our users can do acceptance testing.

Trying to export the app and the related flows in a solution has not been as smooth as we would expect it to be.

 

Note: We are working exclusively with SharePoint lists for data connections

 

Solutions (Microsoft recommended):

  • Power App data sources need to delete and reconnect each export
  • Environment variables need to update each export
  • All people picker fields in the power app need to be edited to turn searching on, every export.
  • All cloud flows connections stop working, each action/function/trigger needs to be edited to have a new connection.
  • Some flows or parts of flows need to be recreated for the flow to work again.
  • Flows in solutions do not appear in the PowerApp’s “Actions” tab to be used. If we save as outside of the solution, it shows up.

PowerApp connections to SharePoint lists need to be recreated, then the App needs to be saved, published for this to work, this should be able to be achieved with environment variables, without publishing the app again.

 

If we try to export and import the app(and flows), not using a solution;

  • We have to edit the powerapp and reconnect the trigger from powerapp flows.
  • Environment variables are not supported and requires significant changes to each flow and the PowerApp to point to the correct sources.
  • We have remove powerapp trigger flows from the app before export, then add them again after import.

We would like an easy way to export to another environment, without the flows & connections breaking and for us not to touch the PowerApp. We can foresee that any feature update or bugfix will break the production version.

 

Does anyone have any insight on how we can overcome these limitations/issues?

 

Thanks in advanced.

12 REPLIES 12
cchannon
Multi Super User
Multi Super User

Solutions are the correct way to move this content. What might appear to be connections "breaking" between environments is actually intentional behavior. It is assumed that when you promote between environments you will want to target other environments or use other credentials to create the connections, so the connections themselves do not move in a solution; only connection references move in a solution. Connections and Connection References are two different things and when you create a Flow or Canvas App you need to ensure you are using the right one.

 

Ensure that your Flows/apps were created in a solution originally. Otherwise they might be using just connections and not connection references. The distinction is important because a connection reference will move with the solution and prompt you to update the destination and credentials when you import it to the new environment; a connection will not move in a solution.

Pchan3
Advocate I
Advocate I

Thanks @cchannon ,

 

We were able to get into a support meeting with Microsoft to demonstrate all of the issues we are facing with deployments, I felt it would be best to document the issues here, and get help from the community and Microsoft, If any of the issues we face are solved, we will update this thread. 

 

We have confirmed that solutions are the way to go, this is the way we want to go as it allows for child flow triggering in addition to the other benefits. As per Microsoft's recommendations we have abandoned out of solution deployments. The following documented issues are all relating to solution deployments.


We are using connection references, All of our flows & app were recreated within a solution. We did clean up a number of them as there were many duplicates, so this is now better. However, several issues still remain. I hope I am explaining this well enough.

 

  • DataSources have to be removed and re-added from within the PowerApp, we are using environment variables to store this information. They do not update within the PowerApp. Microsoft have said this is not expected behaviour.
  • People picker fields are effectively being disabled is also unexpected behaviour, has anyone encountered this before? or any other field that has issues in a deployment.
  • Buttons with Power Automate actions need to be removed and added again, the code against the OnSelect needs to be copied out into notepad and pasted back in for it to work.
  • We can't use a SharePoint view from one list to another with the same name. It works based on GUIDs. This means we have to edit the flow to add this in to get it to work. Is there a way around this? We need to get these migrations as seamless as possible.
  • We have a content conversion action in a flow, which when it gets migrated, the following error occurs

 

InvalidTemplate. Unable to process template language expressions in action 'Send_an_email_to_requestor_with_comments' inputs at line '1' and column '19802': 'The template language expression 'body('Convert_Approver_Comments_to_Text(Approve)')?['body']' cannot be evaluated because property 'body' cannot be selected. Property selection is not supported on values of type 'String'. Please see https://aka.ms/logicexpressions for usage details.'.​

This is fixed by removing the output of the previous action which is a "HTML to Text Content Conversion" action and adding them back.

 

 

Thanks once again

 

 

I have some of the same issues.

 

"DataSources have to be removed and re-added from within the PowerApp, we are using environment variables to store this information. They do not update within the PowerApp. Microsoft have said this is not expected behaviour."

 

Take a look at you original App, and remove all connections. Then add them again using the Environment variables. Also check you galleries and formulas that reference the old connection names. Update them to use the names of the Environment Variables. (I have a prefix on my Environment variables, like SPList - <name of list> for SharePoint List and SPSite - <name of site>, for SP sites.) Makes it easy to add and check the Power app connections and actions.

 

"People picker fields are effectively being disabled is also unexpected behaviour, has anyone encountered this before? or any other field that has issues in a deployment."

 

I have not experienced this, yet...

 

"Buttons with Power Automate actions need to be removed and added again, the code against the OnSelect needs to be copied out into notepad and pasted back in for it to work."

 

This was irritating me as well. After I started to create flows in the Solution, this is not an issue anymore.

BUT, there is also a new way to fix it, if you get the problem again. 

In the Power App Settings - Upcoming features - Preview,  you can turn on Enable Power automate pane.

Now when you edit the App, you can remove the connection and re-add it without doing anything with buttons and formulas.

 

PerOveSand_0-1638346063331.png

 

 

We can't use a SharePoint view from one list to another with the same name. It works based on GUIDs. This means we have to edit the flow to add this in to get it to work. Is there a way around this? We need to get these migrations as seamless as possible.

 

Not experienced, yet...

 

We have a content conversion action in a flow, which when it gets migrated, the following error occurs.

 

Not experienced, yet...

dave-jorgensen
Kudo Collector
Kudo Collector

My experience (which is a lot) doing the same thing:

  • DataSources have to be removed and re-added from within the PowerApp, we are using environment variables to store this information. They do not update within the PowerApp. Microsoft have said this is not expected behaviour.

The solution will be (but not currently) to have the SharePoint lists as environment variables but they don't currently work in PowerApps (but they do in Flows). This is a known issue, that I've had a ticket open for a while on. Current resolution is to indeed delete the datasources and re-add them after deployment.

  • People picker fields are effectively being disabled is also unexpected behavior, has anyone encountered this before? or any other field that has issues in a deployment.

I've seen similar behavior within components, where changing the data source sets searchable to false, and I'm pretty sure it's because the field specified in the search doesn't exist when the datasource is in error state. If you don't have thousands of users as your people picker choices, I'd suggest putting the users all in a local collection and then using the local collection as the datasource in the combobox field. Load the users off of the app start.  

  • Buttons with Power Automate actions need to be removed and added again, the code against the OnSelect needs to be copied out into notepad and pasted back in for it to work.

If you fix your connection / connectors issue this likely goes away, following earlier suggestions to make sure you are using connection references and not connections <= that is VERY important. But that being said, try fixing the flows before even opening the app to change the datasources. If that still doesn't work, you don't need to delete the button. just delete the flow from the app, add a new button to the app, and re-add the flow (this sets the new button OnSelect to call the flow, instead of overwriting it in your existing button). You can (keeping that new button selected) add all your flows and it will just keep setting the OnSelect there. Then delete the new button you just added.

  • We can't use a SharePoint view from one list to another with the same name. It works based on GUIDs. This means we have to edit the flow to add this in to get it to work. Is there a way around this? We need to get these migrations as seamless as possible.

Once the bug with using SharePoint lists and environment variables is fixed, I expect this will work as well. 

  • We have a content conversion action in a flow, which when it gets migrated, the following error occurs

Haven't seen that myself.

PerOveSand
Frequent Visitor

Update to my earlier post: I have now done a few more exports and imports, with the same solutions I have successfully done before.

NOW they loose their connections. 

So I have to open the imported app, remove and add the connections again! Even if they are Environment Variables AND I have set them during import. 

 

I even set the values for the Env Vars, in the Default Solution. But still the connections in the app pointed to the wrong SharePoint site (dev site).

 

I also see that Combo Boxes set the Search settings to false, as mentioned by @dave-jorgensen 

And go through all the Combo boxes and set search to true.

 

I have also seen that the App is NOT upgraded, when doing an Upgrade import. The version is the same, and import process is all ok. But when opening the App, the Screen that I updated, was like the last version. I had to fix it by deleting the Solution and import again as a new solution.

 

So I think the ALM is almost useless! Not trustworthy at all!

(Is this a conspiracy to get us all to use DataVerse instead? 😉 )

 

Have anyone tried using Azure DevOps pipelines instead?

RE: I have also seen that the App is NOT upgraded, when doing an Upgrade import. The version is the same, and import process is all ok. But when opening the App, the Screen that I updated, was like the last version. I had to fix it by deleting the Solution and import again as a new solution.

You need to understand the concept of layering. When you deploy a managed solution to an environment, it is the base layer. You then make edits (ie changing the data sources), this creates an unmanaged solution on top of the base layer. NOTE that this unmanaged layer is EVERYTHING. It's not just a "i changed the datasource" but more of "I changed everything to customize the app here", and that top layer takes precedent. Now, when you deploy an upgrade, you are upgrading the BASE layer, but your unmanaged layer remains on top of your base and this is why it looks like the old version. Do a google on removing the unmanaged layers on top of your managed layers. This is what you need to do after an upgrade - you need to remove ALL unmanaged layers. Then, you'll have to redo the remove and add sharepoint datasources (which creates a new unmanaged layer) since you need to remove all unmanaged layers first so that your new base managed solution becomes "the boss" then you remove / re-add the sharepoint datasources for the customizations (ie unmanaged layer) on top of the base (managed) layer)

 

the key thing to keep in mind is:

  1. deploy a managed solution
  2. make your edits (such as changing sharepoint data source) which creates an unmanaged layer
  3. deploy your changes in a new version of a managed solution
  4. delete the unmanages layers in your apps and flows
  5. edit the apps / flows as needed for changing data sources and so on.

This is where the environment variables come in, if you use them in your flows (sharepoint site urls, sharepoint list urls) then you don't need to make the edits, since the environment variables don't change per se after a deploy (though environment variables still have bugs), Environment variables for datasources like sharepoint don't work yet in powerapps so you won't get the proper effect using an environment variable as a datasource. Microsoft is working on this bug, but for flows they work great.

Wow @dave-jorgensen! This is really a very good explanation and very helpful!

I did read the docs about the layers, but I certainly haven't perceived that an unmanaged solution layer is added on top of the base layer, if you edit the app in the Standard Solution.

 

Maybe it is better to just use unmanaged Solutions in both Dev and Prod? Then the upgrade and layering will not be a problem, since unmanaged has no layers?

 

Anyway. Thank you very much for your insights. 

Must now create a procedure document to fix all the annoying stuff 🙂

dave-jorgensen
Kudo Collector
Kudo Collector

the layers sitting on top is why you had success deleting the solution and re-installing, since that removes the base managed layers and all the unmanaged layers on top. One of the options when deploying using the classic CRM user interface is to remove all existing customizations (which are your unmanaged layers), you could give that a try.

Anyway, the IDEA with managed solutions is you put your site specific things like urls for data sources (DEV, TEST, PROD) into environment variables and that's what you change when you deploy the first time (and only the first time). You're supposed to NOT be editing apps and flows, so try to think of it that way. What needs to happen to avoid creating the unmanaged layers in the first place.

Pchan3
Advocate I
Advocate I

Hi All,

 

Just an update to, to where we currently stand.

 

  • Recent Power Platform (Apps) Updates have resolved the People Picker field issue.
    • Our Authoring version is: 3.21113.12 We manually updated this for each Canvas App.
    • The App I was working on was about 5 versions behind.
  • We believe we are now on the following Power Automate version or later (Oceania):
    • Power Automate Portal Version 2111.1 - Release Notes | Microsoft Docs
    • The Power Automate flow (with Content Conversion) was created before this version, we removed the affected action and added it again. The deployment to Test was successful.
    • We believe when this new version was brought out, it breaks the flow on import.
    • Body dynamic outputs are now generated using @body('actionName') instead of @outputs('actionName')?['body']
  • We are using an Environment variable to store the GUID of the List View.
    • This is less than Ideal, but we don't have to edit the flow.
  • Adding the Power Automate Pane has helped. this required changing the authoring version to the latest, in order to enable it. Thank you @PerOveSand 

 

It isn't over yet! we still have issues with Data sources, working with Microsoft to get this sorted. We will have to investigate using DataVerse (maybe it is a conspiracy!). The apps we are developing are some of the first outside of D365, so not too sure on mixing them. 

 

Thank you all for your suggestions & support!

Helpful resources

Announcements

Exclusive LIVE Community Event: Power Apps Copilot Coffee Chat with Copilot Studio Product Team

  It's time for the SECOND Power Apps Copilot Coffee Chat featuring the Copilot Studio product team, which will be held LIVE on April 3, 2024 at 9:30 AM Pacific Daylight Time (PDT).     This is an incredible opportunity to connect with members of the Copilot Studio product team and ask them anything about Copilot Studio. We'll share our special guests with you shortly--but we want to encourage to mark your calendars now because you will not want to miss the conversation.   This live event will give you the unique opportunity to learn more about Copilot Studio plans, where we’ll focus, and get insight into upcoming features. We’re looking forward to hearing from the community, so bring your questions!   TO GET ACCESS TO THIS EXCLUSIVE AMA: Kudo this post to reserve your spot! Reserve your spot now by kudoing this post.  Reservations will be prioritized on when your kudo for the post comes through, so don't wait! Click that "kudo button" today.   Invitations will be sent on April 2nd.Users posting Kudos after April 2nd. at 9AM PDT may not receive an invitation but will be able to view the session online after conclusion of the event. Give your "kudo" today and mark your calendars for April 3rd, 2024 at 9:30 AM PDT and join us for an engaging and informative session!

Tuesday Tip: Unlocking Community Achievements and Earning Badges

TUESDAY TIPS are our way of communicating helpful things we've learned or shared that have helped members of the Community. Whether you're just getting started or you're a seasoned pro, Tuesday Tips will help you know where to go, what to look for, and navigate your way through the ever-growing--and ever-changing--world of the Power Platform Community! We cover basics about the Community, provide a few "insider tips" to make your experience even better, and share best practices gleaned from our most active community members and Super Users.   With so many new Community members joining us each week, we'll also review a few of our "best practices" so you know just "how" the Community works, so make sure to watch the News & Announcements each week for the latest and greatest Tuesday Tips!     THIS WEEK'S TIP: Unlocking Achievements and Earning BadgesAcross the Communities, you'll see badges on users profile that recognize and reward their engagement and contributions. These badges each signify a different achievement--and all of those achievements are available to any Community member! If you're a seasoned pro or just getting started, you too can earn badges for the great work you do. Check out some details on Community badges below--and find out more in the detailed link at the end of the article!       A Diverse Range of Badges to Collect The badges you can earn in the Community cover a wide array of activities, including: Kudos Received: Acknowledges the number of times a user’s post has been appreciated with a “Kudo.”Kudos Given: Highlights the user’s generosity in recognizing others’ contributions.Topics Created: Tracks the number of discussions initiated by a user.Solutions Provided: Celebrates the instances where a user’s response is marked as the correct solution.Reply: Counts the number of times a user has engaged with community discussions.Blog Contributor: Honors those who contribute valuable content and are invited to write for the community blog.       A Community Evolving Together Badges are not only a great way to recognize outstanding contributions of our amazing Community members--they are also a way to continue fostering a collaborative and supportive environment. As you continue to share your knowledge and assist each other these badges serve as a visual representation of your valuable contributions.   Find out more about badges in these Community Support pages in each Community: All About Community Badges - Power Apps CommunityAll About Community Badges - Power Automate CommunityAll About Community Badges - Copilot Studio CommunityAll About Community Badges - Power Pages Community

Tuesday Tips: Powering Up Your Community Profile

TUESDAY TIPS are our way of communicating helpful things we've learned or shared that have helped members of the Community. Whether you're just getting started or you're a seasoned pro, Tuesday Tips will help you know where to go, what to look for, and navigate your way through the ever-growing--and ever-changing--world of the Power Platform Community! We cover basics about the Community, provide a few "insider tips" to make your experience even better, and share best practices gleaned from our most active community members and Super Users.   With so many new Community members joining us each week, we'll also review a few of our "best practices" so you know just "how" the Community works, so make sure to watch the News & Announcements each week for the latest and greatest Tuesday Tips!   This Week's Tip: Power Up Your Profile!  🚀 It's where every Community member gets their start, and it's essential that you keep it updated! Your Community User Profile is how you're able to get messages, post solutions, ask questions--and as you rank up, it's where your badges will appear and how you'll be known when you start blogging in the Community Blog. Your Community User Profile is how the Community knows you--so it's essential that it works the way you need it to! From changing your username to updating contact information, this Knowledge Base Article is your best resource for powering up your profile.     Password Puzzles? No Problem! Find out how to sync your Azure AD password with your community account, ensuring a seamless sign-in. No separate passwords to remember! Job Jumps & Email Swaps Changed jobs? Got a new email? Fear not! You'll find out how to link your shiny new email to your existing community account, keeping your contributions and connections intact. Username Uncertainties Unraveled Picking the perfect username is crucial--and sometimes the original choice you signed up with doesn't fit as well as you may have thought. There's a quick way to request an update here--but remember, your username is your community identity, so choose wisely. "Need Admin Approval" Warning Window? If you see this error message while using the community, don't worry. A simple process will help you get where you need to go. If you still need assistance, find out how to contact your Community Support team. Whatever you're looking for, when it comes to your profile, the Community Account Support Knowledge Base article is your treasure trove of tips as you navigate the nuances of your Community Profile. It’s the ultimate resource for keeping your digital identity in tip-top shape while engaging with the Power Platform Community. So, dive in and power up your profile today!  💪🚀   Community Account Support | Power Apps Community Account Support | Power AutomateCommunity Account Support | Copilot Studio  Community Account Support | Power Pages

Super User of the Month | Chris Piasecki

In our 2nd installment of this new ongoing feature in the Community, we're thrilled to announce that Chris Piasecki is our Super User of the Month for March 2024. If you've been in the Community for a while, we're sure you've seen a comment or marked one of Chris' helpful tips as a solution--he's been a Super User for SEVEN consecutive seasons!       Since authoring his first reply in April 2020 to his most recent achievement organizing the Canadian Power Platform Summit this month, Chris has helped countless Community members with his insights and expertise. In addition to being a Super User, Chris is also a User Group leader, Microsoft MVP, and a featured speaker at the Microsoft Power Platform Conference. His contributions to the new SUIT program, along with his joyous personality and willingness to jump in and help so many members has made Chris a fixture in the Power Platform Community.   When Chris isn't authoring solutions or organizing events, he's actively leading Piasecki Consulting, specializing in solution architecture, integration, DevOps, and more--helping clients discover how to strategize and implement Microsoft's technology platforms. We are grateful for Chris' insightful help in the Community and look forward to even more amazing milestones as he continues to assist so many with his great tips, solutions--always with a smile and a great sense of humor.You can find Chris in the Community and on LinkedIn. Thanks for being such a SUPER user, Chris! 💪🌠

Find Out What Makes Super Users So Super

We know many of you visit the Power Platform Communities to ask questions and receive answers. But do you know that many of our best answers and solutions come from Community members who are super active, helping anyone who needs a little help getting unstuck with Business Applications products? We call these dedicated Community members Super Users because they are the real heroes in the Community, willing to jump in whenever they can to help! Maybe you've encountered them yourself and they've solved some of your biggest questions. Have you ever wondered, "Why?"We interviewed several of our Super Users to understand what drives them to help in the Community--and discover the difference it has made in their lives as well! Take a look in our gallery today: What Motivates a Super User? - Power Platform Community (microsoft.com)

March User Group Update: New Groups and Upcoming Events!

  Welcome to this month’s celebration of our Community User Groups and exciting User Group events. We’re thrilled to introduce some brand-new user groups that have recently joined our vibrant community. Plus, we’ve got a lineup of engaging events you won’t want to miss. Let’s jump right in: New User Groups   Sacramento Power Platform GroupANZ Power Platform COE User GroupPower Platform MongoliaPower Platform User Group OmanPower Platform User Group Delta StateMid Michigan Power Platform Upcoming Events  DUG4MFG - Quarterly Meetup - Microsoft Demand PlanningDate: 19 Mar 2024 | 10:30 AM to 12:30 PM Central America Standard TimeDescription: Dive into the world of manufacturing with a focus on Demand Planning. Learn from industry experts and share your insights. Dynamics User Group HoustonDate: 07 Mar 2024 | 11:00 AM to 01:00 PM Central America Standard TimeDescription: Houston, get ready for an immersive session on Dynamics 365 and the Power Platform. Connect with fellow professionals and expand your knowledge. Reading Dynamics 365 & Power Platform User Group (Q1)Date: 05 Mar 2024 | 06:00 PM to 09:00 PM GMT Standard TimeDescription: Join our virtual meetup for insightful discussions, demos, and community updates. Let’s kick off Q1 with a bang! Leaders, Create Your Events!    Leaders of existing User Groups, don’t forget to create your events within the Community platform. By doing so, you’ll enable us to share them in future posts and newsletters. Let’s spread the word and make these gatherings even more impactful! Stay tuned for more updates, inspiring stories, and collaborative opportunities from and for our Community User Groups.   P.S. Have an event or success story to share? Reach out to us – we’d love to feature you!

Users online (6,591)