Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info

Steps to install APSD in D365 PowerApps platform

...

Expand
titleHow to create new security roles

Security roles are now included as part of the solution and will be migrated between environments as part of it.

  1. Click on the settings icon in the top right corner, then navigate to Advanced settingsSecuritySecurity Roles

  2. Select Service Writer and perform a copy role

  3. Create the following new roles, case sensitive.

    • AP Engineer

    • AP Clerk

    • AP Manager

    • AP Invoice Manager

Export the solution

Data will not be migrated between environments. This would need to be done separately using Excel files.

  1. Return to the modern Power Apps UI and select the environment you are migrating from.

  2. Click on Solutions on the left-hand menu and then click on the APSD solution.

  3. Click Publish all customizations in the top menu bar.

  4. Switch to the Overview tab on the side and click ExportNext.

  5. Increase version number as applicable, and select Unmanaged, then click on Export.

...

Setting Up a New Environment

When setting up a brand new environment, there are a few additional steps that must be done other than simply importing the solution. The custom connectors must be created (as there is currently a bug that doesn’t allow them to be migrated with the solution) and all lookup data must be imported.

* Custom connectors must be created before importing the solution.

Expand
titleCreating custom connectors in new environment
Note

Must be done before importing the solution & only for NEW EMPTY environments.

The custom connectors cannot be created/added to a solution as there is a bug with Power Apps that does not allow them to be shared in this scenario. The workaround provided by Microsoft also does not work.

  1. On the left hand menu, navigate to DataCustom Connectors

  2. Click on + NewOtherCustom connector.

  3. In the Connector Name field, type “APSR”.

  4. Toggle the Swagger Editor to ON, delete all the code and copy/paste the code from the APSR.json file.

  5. Toggle the Swagger Editor to OFF.

  6. Ensure you are in the General tab and then verify that the Host and Base URL point to the correct location for the environment you are in (refer to chart below).

  7. Click Create connector.

  8. Click on the Test tab, then + New connection.

  9. Enter the API Key (RDIMS 17999814) and click Create connection.

  10. Repeat steps 3-9 to create the SIAPI connector using the SIAPI.json file.
    **This API doesn’t require an API Key.

  11. Repeat steps 3-10 to create the SPAPI connector using the SPAPI.json file.

  12. Repeat steps 3-10 to create the MTAPI connector using the MTAPI.json file.

  13. Repeat steps 3-10 to create the TMAPI connector using the TMAPI.json file.

  14. For all 5 connectors, share them with the organization.

    • Click ...Invite another userShare with orgSave.

...

    • Image Added
    • You can also give edit rights to other developers here.

  1. On the left hand menu, navigate to Data -> Connections.

  2. For each connection, share them with the organization.

    • Click ...Share+ Add everyone in my orgSave.

Expand
titleMicrosoft Bug: Cannot share custom connectors contained within a solution (Workaround - FAILED)

There is a bug with D365 that doesn’t allow sharing of custom connectors if they are included in a solution. Workaround: https://youtu.be/ROKO589RBnQ

  1. Go to DataTablesConnector table → Data tab.

  2. Select the connector and click on Edit Record.

  3. Click SHAREAdd User/Team → Select Team in the Look for dropdown.

  4. Check off the team that is named after the environment.

  5. Click SelectAdd.

  6. Ensure that they only have Read access (for other users, refer to chart below).

  7. Click Share.

Migrating the Application Between Environments

Export the solution

Data will not be migrated between environments through the solution. You will need to perform data migration separately following the steps below.

  1. Return to the modern Power Apps UI and select the environment you are migrating from.

  2. Click on Solutions on the left-hand menu and then click on the APSD solution.

  3. Click Publish all customizations in the top menu bar.

  4. Switch to the Overview tab on the side and click ExportNext.

  5. Increase version number as applicable, and select Unmanaged, then click on Export.

Note

We have to export it as unmanaged due to the custom connectors, which cannot be exported as part of the solution. They need to be recreated in the new environment and then the app must be updated to point to the “new” connectors. Once Microsoft fixes this bug, we can then migrate the connectors as part of the solution and this should allow us to use a managed solution.

Import the solution

  1. Click on Solutions on the left-hand menu and then Import in the top menu bar.

  2. Select Browse and point to the zip file, APSD_1_0_0_X.zip, created in the export solution steps. "X" will be the current iteration number at the time of deployment.

  3. Click Next twice and create a new connection for both Outlook and Dataverse.

  4. For both connectors, select a predefined system account that is a System Administrator. This information needs to be handed over by the Exchange group, in the DEV environment we are using our own accounts.

  5. Click Import and wait for the process to finish.

  6. Click on Publish all customizations.

...

  1. Go to edit the Service Request Canvas app.

  2. When prompted, select Don't Allow.

  3. Remove all connections that are showing as not connected - 5 connections (APSR, MTAPI, SIAPI, SPAPI, TMAPI), Office365Users and APSD_Translations.

    Image RemovedImage Added
  4. Add all of them back.

  5. For APSD_Translation, connect to SharePoint data connector. In the box enter the following URL: https://034gc.sharepoint.com/sites/DSD-CivilAviation/Lists/APSD_Translations/AllItems.aspx

    Image RemovedImage Added
  6. Check off the APSD_Translations list & click Connect.

  7. Run the App Checker and ensure no errors are reported.

  8. Go to the “New Service Request Step One Screen" and click on the cboNapaProject element. Turn on “Allow searching” in the properties.

  9. Go to the “New Service Request Step Three Contact Info Screen” and click on the cboFindOrganizationAlt element. Turn on "Allow searching" in the properties.

  10. Save and Publish the app.

...

Importing/Migrating Data

When setting up a new environment, all lookup data must be brought into the environment. This can be done either through creating a dataflow to migrate data between environments or by importing the data from an Excel spreadsheet.

Expand
titleImporting SCRAM task data
Info

Alternative solution: Follow https://docs.microsoft.com/en-us/powerapps/developer/data-platform/dataverse-odata-dataflows-migration to create a dataflow to migrate the data between environments. This currently exists for QA → ACC.

  1. Go to the environment that has the master set of data for the SCRAM tasks. Currently, this is QA.

  2. On the left menu, go to DataTables, then open the Scram Tasks table.

  3. On the top menu, click on DataExport data. Once the export has been successfully completed, click on Download exported data.

  4. Unzip the csv file.

  5. Switch to the environment you are deploying to.

  6. On the left menu, go to DataTables, then open the Scram Tasks table.

  7. On the top menu, click on Data> beside Get dataGet data from Excel.

  8. Upload the csv file from step 4. If there are any mapping issues, fix them.

  9. Click Import. Wait for the process to complete, then verify that the data was imported.

Expand
titleImporting AP task data 

Follow the same steps for Importing SCRAM task data using the AP Task table instead.

Flows

Expand
titleTimesheet Approval Notifications

Name: Flow - TimeSheetNotifications

Description: This Power Automate Flow triggers when the “ap_timsheetstatus” field is modified to “Rejected”. The flow sends an email to the submitter.

...