cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
seadude
Memorable Member
Memorable Member

Moving Canvas Apps w/ Sharepoint Lists and Flows from DEV to PROD Env.

Hello,

 

I only develop PowerApps canvas apps that use Sharepoint as a backend. Some integrate with Flows that trigger either from the app or from the Sharepoint list when a new record is added, etc. 

 

What is the easiest way to move these apps between say, DEV and PROD environments within my org? 

 

Architecture:

- _DEV/_PROD versions of the app

- _DEV/_PROD versions of the Sharepoint list

- _DEV/_PROD versions of the Flow

- When v1.0 of an app is good in _DEV, time to migrate to _PROD

- For v1.1 and above, I'll export from _DEV and *update* app in _PROD

 

Current Process: 

- Export .stp file of _DEV Sharepoint list

- Import .stp file as "LIST_NAME_PROD"

- Connect the _PROD list to the _DEV app

- Write some code `OnStart`: Set(varEnv, "DEV")

- Wrap all calls to the Sharepoint list with If(varEnv = "DEV" <read/write from/to_DEV Sharepoint list>, <read/write from/to _PROD list>)

- Then when I import the app to _PROD env, I change varEnv to "PROD"

 

This works *fairly well*, but isn't nearly as automated as I'd like. 

 

Anyone else have a simple way to do this?

1 ACCEPTED SOLUTION

Accepted Solutions
MBDA
Advocate I
Advocate I

Hi Seadude,

If you are after full automation, you can use Azure DevOps with a solution approach.
1. Create a solution for your project by going to the https://make.powerapps.com/.

2. Include all power platform components (Power App, Flow/Power Automate/Cloud Flow) in the solution.

3. You might have to re-create a flow from the solution to get it working properly in the destination environment (not sure if this bug is resolved yet or not).

4. Export a solution into the DevOps repository as explained in the links below
https://docs.microsoft.com/en-us/power-platform/alm/devops-build-tools
https://docs.microsoft.com/en-us/power-platform/alm/devops-build-tool-tasks

5. Add a PnP-PowerShell script to export your SharePoint list from the Dev and import it into the Prod.
https://spblog.net/post/2018/10/08/VSTS-stories-Run-PnP-PowerShell-scripts-in-your-build-with-ease!

6. Import your solution as a managed solution in your Prod environment.

If you are not up for PnP-PowerShell, you can also explore the Power Automate to migrate SharePoint lists between environments as I remember moving items between SharePoint lists in different environment. So, it maybe possible depending on your use case. After setup, everything will be automated.


View solution in original post

3 REPLIES 3
FCGALLEG
Community Support
Community Support

Hi Seadude, 

 

Did you think to use a Solution to move all together?

https://docs.microsoft.com/en-us/powerapps/maker/data-platform/solutions-overview

https://powerapps.microsoft.com/en-us/blog/powerapps-packaging/

 

I hope it helps you.

 

Regards,

Javier

 

seadude
Memorable Member
Memorable Member

Hi @FCGALLEG , 

Thanks for the idea. Yeah, I played with this.

- Lots of limitations for canvas apps (https://docs.microsoft.com/en-us/powerapps/maker/data-platform/solutions-overview#known-limitations).

- Requires CDS / Dataverse

- Also, I don't see a way to bundle a Sharepoint list in there

MBDA
Advocate I
Advocate I

Hi Seadude,

If you are after full automation, you can use Azure DevOps with a solution approach.
1. Create a solution for your project by going to the https://make.powerapps.com/.

2. Include all power platform components (Power App, Flow/Power Automate/Cloud Flow) in the solution.

3. You might have to re-create a flow from the solution to get it working properly in the destination environment (not sure if this bug is resolved yet or not).

4. Export a solution into the DevOps repository as explained in the links below
https://docs.microsoft.com/en-us/power-platform/alm/devops-build-tools
https://docs.microsoft.com/en-us/power-platform/alm/devops-build-tool-tasks

5. Add a PnP-PowerShell script to export your SharePoint list from the Dev and import it into the Prod.
https://spblog.net/post/2018/10/08/VSTS-stories-Run-PnP-PowerShell-scripts-in-your-build-with-ease!

6. Import your solution as a managed solution in your Prod environment.

If you are not up for PnP-PowerShell, you can also explore the Power Automate to migrate SharePoint lists between environments as I remember moving items between SharePoint lists in different environment. So, it maybe possible depending on your use case. After setup, everything will be automated.


View solution in original post

Helpful resources

Announcements
User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Kudoed Authors
Users online (2,724)