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...

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 🙂

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

Community will be READ ONLY July 16th, 5p PDT -July 22nd

Dear Community Members,   We'd like to let you know of an upcoming change to the community platform: starting July 16th, the platform will transition to a READ ONLY mode until July 22nd.   During this period, members will not be able to Kudo, Comment, or Reply to any posts.   On July 22nd, please be on the lookout for a message sent to the email address registered on your community profile. This email is crucial as it will contain your unique code and link to register for the new platform encompassing all of the communities.   What to Expect in the New Community: A more unified experience where all products, including Power Apps, Power Automate, Copilot Studio, and Power Pages, will be accessible from one community.Community Blogs that you can syndicate and link to for automatic updates. We appreciate your understanding and cooperation during this transition. Stay tuned for the exciting new features and a seamless community experience ahead!

Summer of Solutions | Week 4 Results | Winners will be posted on July 24th

We are excited to announce the Summer of Solutions Challenge!   This challenge is kicking off on Monday, June 17th and will run for (4) weeks.  The challenge is open to all Power Platform (Power Apps, Power Automate, Copilot Studio & Power Pages) community members. We invite you to participate in a quest to provide solutions in the Forums to as many questions as you can. Answers can be provided in all the communities.    Entry Period: This Challenge will consist of four weekly Entry Periods as follows (each an “Entry Period”)   - 12:00 a.m. PT on June 17, 2024 – 11:59 p.m. PT on June 23, 2024 - 12:00 a.m. PT on June 24, 2024 – 11:59 p.m. PT on June 30, 2024 - 12:00 a.m. PT on July 1, 2024 – 11:59 p.m. PT on July 7, 2024 - 12:00 a.m. PT on July 8, 2024 – 11:59 p.m. PT on July 14, 2024   Entries will be eligible for the Entry Period in which they are received and will not carryover to subsequent weekly entry periods.  You must enter into each weekly Entry Period separately.   How to Enter: We invite you to participate in a quest to provide "Accepted Solutions" to as many questions as you can. Answers can be provided in all the communities. Users must provide a solution which can be an “Accepted Solution” in the Forums in all of the communities and there are no limits to the number of “Accepted Solutions” that a member can provide for entries in this challenge, but each entry must be substantially unique and different.    Winner Selection and Prizes: At the end of each week, we will list the top ten (10) Community users which will consist of: 5 Community Members & 5 Super Users and they will advance to the final drawing. We will post each week in the News & Announcements the top 10 Solution providers.  At the end of the challenge, we will add all of the top 10 weekly names and enter them into a random drawing.  Then we will randomly select ten (10) winners (5 Community Members & 5 Super Users) from among all eligible entrants received across all weekly Entry Periods to receive the prize listed below. If a winner declines, we will draw again at random for the next winner.  A user will only be able to win once overall. If they are drawn multiple times, another user will be drawn at random.  Individuals will be contacted before the announcement with the opportunity to claim or deny the prize.  Once all of the winners have been notified, we will post in the News & Announcements of each community with the list of winners.   Each winner will receive one (1) Pass to the Power Platform Conference in Las Vegas, Sep. 18-20, 2024 ($1800 value). NOTE: Prize is for conference attendance only and any other costs such as airfare, lodging, transportation, and food are the sole responsibility of the winner. Tickets are not transferable to any other party or to next year’s event.   ** PLEASE SEE THE ATTACHED RULES for this CHALLENGE**   Week 1 Results: Congratulations to the Week 1 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Community MembersNumber of SolutionsSuper UsersNumber of Solutions @anandm08  23 @WarrenBelz  31 @DBO_DV  10 @Amik  19 AmínAA 6 @mmbr1606  12 @rzuber  4 @happyume  7 @Giraldoj  3@ANB 6 (tie)   @SpongYe  6 (tie)     Week 2 Results: Congratulations to the Week 2 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Community MembersSolutionsSuper UsersSolutions @anandm08  10@WarrenBelz 25 @DBO_DV  6@mmbr1606 14 @AmínAA 4 @Amik  12 @royg  3 @ANB  10 @AllanDeCastro  2 @SunilPashikanti  5 @Michaelfp  2 @FLMike  5 @eduardo_izzo  2   Meekou 2   @rzuber  2   @Velegandla  2     @PowerPlatform-P  2   @Micaiah  2     Week 3 Results: Congratulations to the Week 3 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge.   Week 3:Community MembersSolutionsSuper UsersSolutionsPower Apps anandm0861WarrenBelz86DBO_DV25Amik66Michaelfp13mmbr160647Giraldoj13FLMike31AmínAA13SpongYe27     Week 4 Results: Congratulations to the Week 4 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge.   Week 4:Community MembersSolutionsSuper UsersSolutionsPower Apps DBO-DV21WarranBelz26Giraldoj7mmbr160618Muzammmil_0695067Amik14samfawzi_acml6FLMike12tzuber6ANB8   SunilPashikanti8

Check Out | 2024 Release Wave 2 Plans for Microsoft Dynamics 365 and Microsoft Power Platform

On July 16, 2024, we published the 2024 release wave 2 plans for Microsoft Dynamics 365 and Microsoft Power Platform. These plans are a compilation of the new capabilities planned to be released between October 2024 to March 2025. This release introduces a wealth of new features designed to enhance customer understanding and improve overall user experience, showcasing our dedication to driving digital transformation for our customers and partners.    The upcoming wave is centered around utilizing advanced AI and Microsoft Copilot technologies to enhance user productivity and streamline operations across diverse business applications. These enhancements include intelligent automation, AI-powered insights, and immersive user experiences that are designed to break down barriers between data, insights, and individuals. Watch a summary of the release highlights.    Discover the latest features that empower organizations to operate more efficiently and adaptively. From AI-driven sales insights and customer service enhancements to predictive analytics in supply chain management and autonomous financial processes, the new capabilities enable businesses to proactively address challenges and capitalize on opportunities.    

Updates to Transitions in the Power Platform Communities

We're embarking on a journey to enhance your experience by transitioning to a new community platform. Our team has been diligently working to create a fresh community site, leveraging the very Dynamics 365 and Power Platform tools our community advocates for.  We started this journey with transitioning Copilot Studio forums and blogs in June. The move marks the beginning of a new chapter, and we're eager for you to be a part of it. The rest of the Power Platform product sites will be moving over this summer.   Stay tuned for more updates as we get closer to the launch. We can't wait to welcome you to our new community space, designed with you in mind. Let's connect, learn, and grow together.   Here's to new beginnings and endless possibilities!   If you have any questions, observations or concerns throughout this process please go to https://aka.ms/PPCommSupport.   To stay up to date on the latest details of this migration and other important Community updates subscribe to our News and Announcements forums: Copilot Studio, Power Apps, Power Automate, Power Pages

Users online (1,476)