Solutions in Power Platform | ALM, Power Apps, flows & Environments

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone reza here in this video we will focus on solutions in the power platform solutions are the mechanism through which we can implement application life cycle management wherein we can transport our components our apps our flows our pots connections and a lot more from one environment to another it is one of the key concepts that every maker in the power platform should be aware of so let's check it out in action [Music] where do we begin with creating apps flows bots and more in the power platform let's take an example of power apps we start in make.powerapps.com and whenever we come across a scenario wherein we need to create an app we head here start creating our app and connect to our data sources and so and so forth it is very important to understand that whenever you're building something in the power platform ecosystem it is being built in the context of an environment and that environment to begin with is always the default environment the default environment is the standard environment that gets set up for every tenant and in this environment every user who has a valid license be it an office license that covers apps and flows have the rights to create things in this environment and this is something that cannot be blocked by the administrators meaning the default environment is an open environment wherein anyone can create apps flows and more recommendation is to rebrand this environment to personal productivity meaning it should only be leveraged for personal productivity based scenarios and not for business critical applications to implement application lifecycle management in powerapps and other power platform products it is important that a good environment strategy is put in place in my tenant here i have created three different environments one is a dev environment for development purposes a test environment where i would deploy my applications and test and then a production environment when once the testing is complete i will move my applications to the production environment and share the applications with the end users so that they can consume it a power platform environment is a space to store manage and share your organization's business data apps chat bots flows and a lot more it basically serves as a container to separate apps that might have different roles security requirements or target audiences and environments play a key role in application life cycle management in each environment we can have a dataverse database set up and you can only have one database set up per environment how should we be creating our apps flows bots our solutions and porting them over from one environment to another in a controlled and governed manner if you create your apps in make.powerapps.com directly or if you create your flows in powerautomate.com directly all of these are being created outside the context of something known as solutions solutions are used to transport apps and components from one environment to another a solution can contain one or more apps as well as other components such as database tables web resources flows bots and a lot more where should we be creating our apps flows bots and more we should be creating them directly inside of solutions now here i would like to bust a myth the myth is that a solution is a premium feature meaning the user creating the solution or the user accessing the artifacts inside a solution require premium licensing because these solutions or containers are being created inside microsoft dataverse for that specific environment now dataverse as a connector for apps and flows is a premium licensed feature however creating solutions and working with solutions does not require premium licensing all it requires is a dataverse database set up for that environment i'll cover two scenarios the first one is i have access to my dev environment and here i would like to create a solution from scratch i'll head over to solutions click on new solution the use case that i will take for this scenario is a sharepoint list that has information about issues that users report so i would like to create an issue tracking app and i would also like to create a flow that let's say sends a notification email to the admin whenever a new issue is created in the issue tracker list i've given my solution a display name issue tracker publisher every app and other solution components such as tables you create and dataverse or any other customizations that you make ideally would need to be a part of a solution and because every solution has this option of a publisher you should create your own publisher rather than use the default cds publisher option that is provided so in this case i'll create a new publisher i will give a display name can give a description a solution publisher includes a prefix prefix is a mechanism to help avoid naming collisions this allows for solutions from different publishers to be installed in an environment with few conflicts as an example my publisher here is rd youtube so the prefix i will use is rd so any objects that are created in the solution be it apps flows connection references will have this specific prefix applied to it which is rd underscore the name of the object i'll click save and here i will pick my publisher for now this is the first version of the solution that i'm creating so i'm going to stick to that the solution that you create to begin with would be in unmanaged state meaning you're free to make any changes to the components within that solution i'll click create this now creates a solution for me called issue tracker if i select this it will lead me to the solution explorer view and in here is where we should be creating all the artifacts related to the solution i need a canvas app to begin with so i'll head over to new go to app i'll pick canvas app i'll give my app a name click create in the studio experience i can head over to data and start connecting to my data sources now dataverse is environment centric because i can create a dataverse database per environment we have the current environment tables show up and they go perfectly hand in hand with the concept of solutions however from a sharepoint standpoint sharepoint does not understand the concept of environments now in this scenario let's say i need dev and test sites for sharepoint in that case i would have to be creating a sharepoint site i'm creating a new sharepoint site i will add a new list from an existing list pick my sharepoint site that has that list pick that list hit next and i'll click create and this will create that same issue tracking list in a different sharepoint site here which is acting as my test sharepoint site now in my app here if i want to connect to sharepoint i will search for sharepoint once i pick my connection it will list out all my sharepoint sites that i can connect to but here i would like to make it dynamic meaning i would like to define it based upon a configuration parameter because as i move my solutions from dev to test i would like to define the url of my new sharepoint site or my sharepoint list that the test environment needs to point to so for now the app that i just created i will go ahead and save this if i head back and click back again and leave this powerapp and if i head back to my solution that i created in this environment which is called issue tracker my app will be a part of this solution now to create that configuration element related to connecting to my data source which in this case is my sharepoint list in solutions we have an option called environment variables these can have different values for environment i will create an environment variable called issue tracker site and for data types we have various options to choose from in this case i will pick data source the connector will be sharepoint i already have my connection here my parameter type will be site since i'm connecting to a sharepoint site and which site am i connecting to i will click on new site value and this will list out all the sharepoint sites that i've recently worked with if you don't see a site listed here just simply paste the url of your sharepoint site and click save so this now will create an environment variable for me which is a part of this solution now i need another environment variable that points to my issue tracking list in that specific sharepoint site so once again i'll create an environment variable give it a name pick data source sharepoint parameter type will be list the site i will pick from my environment variable that i created which was called issue tracker site and for the list value this will list out all my sharepoint lists as part of that sharepoint site and here is my issue tracking sharepoint list i'll click save back to my powerapp i will select it and click edit in data sources i will go to add data to connect to sharepoint pick my connection here instead of picking your site directly or connecting to your site head over to advanced this will list out all your environment variables solutions is not a premium concept connecting to an environment variable as a data source is not a premium option either so here i will simply pick my sharepoint site this will list out all the lists in that sharepoint site don't pick a list from here head over to advanced and it will list out all the environment variables that you have and here is my issue tracker list environment variable i will pick that and click connect and this now will connect to that issue tracker sharepoint list directly in that sharepoint site that i specified as my environment variable now that i have my list connected here i'll add a simple gallery and connect it to that sharepoint list i can see all that data from my sharepoint list right here i'll go ahead and save and publish my powerapp back to my solution i'll add a flow as well so i'll go to new automation cloudflow and pick an automated cloudflow here i will click skip i will give my flow a name the trigger of my flow will come from sharepoint when a new item is created now this is very similar to what i did in powerapps where i was providing the information of my sharepoint site and list instead of picking my sharepoint site address directly i will go to enter custom value and here under dynamic content we have all our environment variables here is my issue tracker site and the same thing i will do with the list as well and here i would like to send an email and this email let's say i would like to send it out to reza in the subject i will also specify the name of the sharepoint site so whenever this email goes out we can actually see that it's going out from my development side or my test site once i move the solution to a different environment the title of the issue in the body of the email i'll click save the email that's going out to reza let's try and make this dynamic as well i will head back to solutions and create a new environment variable calling it email admin here i'll pick type text and i'll specify a value for this and click save and for my flow instead of hard coding the email i will pick the email from dynamic content under environment variable here is my environment variable i'll click save so this now completes my entire solution now let's test this out for my app i will play this app so the app will load all the issues from my issue tracking sharepoint site which is my dev site and whenever a new item is created it will send an email to my admin email environment variable that i defined which in this case is raza here's the email and we can clearly see that it's pointing to my site in dev which has that issue tracking sharepoint list now let's see how we can move this solution from the dev environment to my test environment or my production environment before you export your solution for your environment variables it is important to take this one extra step head over to edit for the current value remove it from this solution by doing this when you export it out to a different environment it will prompt you to provide a value for this which is exactly what we need when we move from one environment to another so i will repeat the same step for all my three environment variables once i'm done with that i will go back to my solutions pick my issue tracker solution click export here first make sure you publish all the changes that you've made basically all the customizations that i've made inside that solution once that's done you can also check for issues by running the solution checker i will recommend you to do this as well once you're done with this you can click next when you export it you have two options you can export it either as a managed solution or as an unmanaged solution manage solution is the recommended option a managed solution can't be changed unless it has customizable objects basically if you are moving the solution from development to a test or a production environment you will want to use this option unmanaged if you are trying to move this solution to a different development environment here i'll pick managed and click export so this will now begin the process of exporting my solution now here it's important to note that you will have to wait and we get this notification message here that says currently it is exporting this solution once the export is successful you will get the option you have to download so i will go ahead and download the solution now i need to move the solution to my test or my prod environment i will move over to my test environment i have changed the environment using the environment picker i will go to solutions here and import my solution so i will pick my solution that i exported click next this will give me the details of that solution the name the type and who the publisher was i'll click next this now is re-establishing the connections i'll pick my existing one and click next this now will load up all my environment variables so i had the email here let's say in my test environment the notification should go out to a different user i'll pick the email address of another user called sarah in my tenant my sharepoint site here i will pick my test sharepoint site url and paste it in here this will now connect to that sharepoint site and load all the lists in this specific sharepoint site which is my test sharepoint site i'll pick my issue tracking sharepoint list and click import and this now will begin the process of importing my issue tracker solution from my dev to my test environment the import is currently ongoing i can see my solution come in says my solution has been imported successfully here are all my artifacts my environment variables my app my flow if i was to play this app you will note that there are no items in this the reason being the data is coming from the test issue tracker list i'll create a sample item here and now if i refresh that power app we can see that in the test environment the data is coming from the test sharepoint site when a new item is created i have a flow as well that should trigger the flow was also pointing to that environment variable i'm logged in in sara's mailbox for the test environment sarah is supposed to receive that email and here is that email that sarah has received and we can also clearly see the url that is dynamically changing based on that environment variable and since this is a managed solution you can see that i cannot make any changes here in my test environment now let's take our second scenario i already have an app i already have a flow i already have a sharepoint site or i have a table and database that my app or my flow is connected to and all of these things i have created outside of the context of a solution and more or less you would have created it in the default environment now how do i package this up how do i make it solution aware in my scenario i have an app called my tasks app in this app i am connecting to multiple data sources i'm connecting to a sharepoint list and i'm also connecting to a table in dataverse and here the user has the option to view the task information maybe make modifications to it or create new tasks on the fly to include this app as a part of the solutions so i can start implementing alm application lifecycle management i will head over to solutions in my default environment and create a new solution i'll pick my publisher i'll click create so here's my task management solution so i need my app for that i will go to add existing go to app and it's a canvas app so i'll select canvas now these apps are outside of my solution so basically outside dataverse i can search i will pick my app and click add this app has a connection to a list called service desk in my sharepoint site called rdtech so i'll create an environment variable data source sharepoint site and i will give it the current value and i will create another environment variable for my list pick my sharepoint list click save now for the app and my solution i will edit this my connections that i made in my power app were directly made to the sharepoint site but now i want to change it so that it comes from those environment variables that i just created so for that i will head over to data sources and simply remove the sharepoint connection add the connection back to sharepoint and pick the site url from my environment variable and pick the list from my environment variable as well no errors in my app the connection is successful for dataverse i do not have to worry because dataverse already is environment specific next i will save and publish my powerapp i have a flow called service desk report that runs on a schedule gets items from my service desk sharepoint list that are pending and sends it out in an email to reza for my solution i will add my flow which is called service desk report i will add it and for this flow i will edit it the hard-coded references to my sharepoint site this will come from my environment variable same thing for my list name and click save now there's one thing important to note here i will get a warning from the flowchecker that says use connection references flows used in a solution use connection references instead of connections in this case if i look at the two connections that this flow uses it uses the outlook connector and the sharepoint connector now both of these is what i would like to change once you remove those connections go to flow checker it says use connection references click on this link how to fix it directly take us here you can simply click on new connection reference same thing for the outlook connector as well i'll save my flow ready to export to another environment first step my environment variables i will ensure that i remove the current value that's it another important thing to note for my canvas app i was connecting to dataworks so i have that table that i created for work tasks so it's important to make sure that i add required objects i'll click ok so if you note it has gone ahead and added my work task table as well as part of the solution if there are any other dependencies for example dependencies related to my table here i will make sure i add those as well in my case there were a few choice sets my table was referencing once i've added all my dependencies i will export my solution make sure i publish it also run the issue checker click next export as managed once exported i'll download go to my production environment head over to solutions import that solution click next here are my two connection references click import if you enjoyed this video then do like comment and subscribe to my youtube channel and thank you so much for watching
Info
Channel: Reza Dorrani
Views: 82,075
Rating: undefined out of 5
Keywords: power platform solutions, solutions powerapps, solutions power automate, creating solutions in powerapps, soltuions, solution, powerapps managed solution, powerapps managed vs unmanaged solution, power platform alm, power platform environments, powerapps solution publisher, powerapps solution export, power apps solutions, power apps, powerapps, flows, environments, ALM, power platform solutions explained, reza dorrani, power platform, managed solution, import solution in powerapps
Id: Xo-TvZ9N3BM
Channel Id: undefined
Length: 26min 39sec (1599 seconds)
Published: Mon Jul 11 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.