Practice Lab 4 - Power Platform tools
Scenario
As we continue to build our solution, we will now install and configure tools used for extending the Power Platform with code.
Prerequisites
The following software must have been installed:
- .Net Framework
- Visual Studio Community Edition 2022 v17.10.5 or higher
- Visual Studio Code
- Power Platform CLI
High-level lab steps
We will install and configure the following tools:
- Configuration Migration Tool
- XrmToolBox
Things to consider before you begin
- Which tools do you require?
- Which IDE(s) do you require?
Starter solution
A starter solution file for this lab can be found in the C:\Labfiles\L04\Starter folder.
Exercise 1: Configuration Migration Tool
Objective: In this exercise, you will copy reference data between environments.
Task 1.1: Export data from Development
- Open a Command Prompt.
-
Launch the Configuration Migration Tool with the following command.
pac tool cmt
- Select Create schema and select Continue.
- Select Office 365 for Deployment Type.
- Check Display list of available organizations.
- Check Show Advanced.
-
Enter your tenant credentials.
-
Select Login.
- Select your Development environment and select Login.
- Select the Permit Management solution.
- Select the Build Site table under Select Entity.
- Select Build Site, City, Country/Region, State/Province, Street Address, ZIP/Postal Code columns.
-
Select Add Fields >.
- Select the Permit Type table under Select Entity.
- Select Name, Permit Type, Require Inspections, Require Size columns.
- Select Add Fields >.
- Select Save and Export.
- Enter
permit.xml
and select Save. - Select Yes to export the data.
- Select the ellipses … next to Save to data file.
- Enter
permitdata.zip
. -
Select Save.
- Select Export Data.
- Select Exit.
Task 1.2: Import data to Production
- Open the Command Prompt.
- Run the command
pac tool cmt
. - Select Import data
- Select Continue.
- Select Office 365 for Deployment Type.
- Check Display list of available organizations.
- Check Show Advanced.
- Enter your tenant credentials.
- Select Login.
- Select your Production environment and click Login.
- Select the ellipses … next to Zip File.
- Select the permitdata.zip file you created in the previous task and click Open.
- Select Import data
- Select Exit.
- Close the Configuration Migration Tool window.
Exercise 2: Community tools
Objective: In this exercise, you will use FetchXmlBuilder in the XrmToolBox to find inspections with status reason New request or Pending.
Task 2.1: Install XrmToolBox
-
Navigate to XrmToolBox
https://www.xrmtoolbox.com
- Download the latest version of XrmToolBox.
- Right click on the XrmToolBox.zip file and select Properties.
- Select Unblock and Apply.
- Extract the XrmToolBox.zip file to a folder.
-
Run XrmToolBox.exe from the folder.
- Select Open Tool Library.
-
Search for
fetchxml
and select FetchXML Builder by Jonas Rapp. - Select Install.
- Select Yes.
- Select Close.
- Search for
trace
and select Plugin Trace Viewer by Jonas Rapp. - Select Install.
- Select Yes.
- Select Close.
- Close the Tool Library tab.
Task 2.2: FetchXML query
- Select the Tools tab in XRMToolBox.
- Search for
fetchxml
and select FetchXML Builder. - Select Yes to Do you want to connect to an organization first?.
- Select Open Connection Manager.
- Select Create a new connection.
- Select Microsoft Login Control.
- Click Open Microsoft Login Control.
- Select Office 365 for Deployment Type.
- Check Display list of available organizations.
- Check Show Advanced.
- Enter your tenant credentials.
- Click Login.
- Select your Development environment and select Login.
- Enter
Dev
for Name and select Finish. - Select Close.
- Select the Dev connection.
- Select OK.
-
Select Continue.
- Click on the (entity) node.
- Select contoso_inspection in the Entity name drop down.
- Click on filter.
- Select statuscode in the Attribute drop down.
- Select Equal in the Operator drop down.
- Select New Request in the Value drop down.
- Click on +condition.
- Select statuscode in the Attribute drop down.
- Select Equal in the Operator drop down.
- Select Pending in the Value drop down.
- Click on the filter node.
-
Select or in the Filter type drop down.
-
Select View and then select FetchXML. The FetchXML should look like the following query.
<fetch top="50"> <entity name="contoso_inspection"> <filter type="or"> <condition attribute="statuscode" operator="eq" value="1" /> <condition attribute="statuscode" operator="eq" value="330650001" /> </filter> </entity> </fetch>
-
Select Execute (F5). You should see a list of inspection records.
-
Select Convert and then select Power Automate Parameters. The filter should look like the following
(statuscode eq 1 or statuscode eq 330650001)