...
Expand | ||
---|---|---|
| ||
Click |
...
Expand | ||
---|---|---|
| ||
Migrating the security roles
Click on the settings icon in the top right corner, then navigate to
Advanced settings
→Security
→Security Roles
Select Service Writer and perform a copy role
...
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.
Return to the modern Power Apps UI and select the
...
environment
...
5. Select Solution and perform an Import action
6. Select Browse and point to the zip file, APSD_1_0_0_X.zip that will be provided. “X” will be the current iteration number at the time of deployment
7. Click Next twice and create a new connection for both
...
8. For both connectors select a predefined system account that is System Administrator on production environment. This information needs to be handed over by Exchange group, in a DEV environment we are using our accounts.
9. Click Import and wait for the process to finish
10. Navigate to Data -> Custom Connectors and select New Connector -> Create from blank
11. Type the name: “APSR” and press Continue
12. Toggle on Swagger Editor, remove all the code and copy/past the code from APSR.json file provided
13. Toggle off Swagger Editor
14. Click on General tab and replace Host with production site, please ask the team in charge with production deployments of APIs to provide that information
...
15. Replace Base URL in the same manner
16. Click in Create Connector
17. Click on Test tab and create a new connection
...
18. Enter the API Key: 1c22a1b4-97e6-473c-a2d7-5bb359edbe9f
19. Create the 2nd connector: “SIAPI” by repeating the steps 11 to 17, given the source file SIAPI.json provided, replace Host and Base URL with production information for this API, and last this connector does not need an API Key, just create a new connection and save.
20. Create the 3rd connector: SPAPI by repeating the steps 11 to 17, given the source file SPAPI.json provided, replace Host and Base URL with production information for this API, create a new connection and add the APP Key: 9b1cde88-aa98-4f56-8b24-c211b4e951a1
21. Create the 4th connector: MTAPI by repeating the steps 11 to 17, given the source file MTAPI.json provided, replace Host and Base URL with production information for this API, create a new connection and add the APP Key: 7a5c9d54b23c41f89267235e99984c04 Remember the following JWT Token if you need to test this API from swagger: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1laWQiOiJBUEEiLCJ1bmlxdWVfbmFtZSI6IkFlcm9uYXV0aWNhbCBQcm9kdWN0IEFwcHJvdmFsIChBUEEpIiwicm9sZSI6IlVzZXIiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3ZlcnNpb24iOiIyLjAiLCJDb3JyZWxhdGlvbktleSI6IjIzNWU5OTk4NGMwNCIsIm5iZiI6MTYyNDU1NDIzNCwiZXhwIjoxNjg3NjI2MjM0LCJpYXQiOjE2MjQ1NTQyMzQsImlzcyI6IlRyYW5zcG9ydCBDYW5hZGEiLCJhdWQiOiJUcmFuc3BvcnQgQ2FuYWRhIn0.9n7xZRC9Ns0I5g91jecVuqj8o8uNG5U4c4XCdFIvPsw
22. Create the 5th connector: TMAPI by repeating the steps 11 to 17, given the source file TMAPI.json provided, replace Host and Base URL with production information for this API, create a new connection and add the APP Key: 9b1cde88-aa98-4f56-8b24-c211b4e951a1
23. Share all five connectors with organization and save
...
24. Open Connections, select all five connections, share with organization and Save
...
you are migrating from.
Click on
Solutions
on the left-hand menu and then click on theAPSD
solution.Click
Publish all customizations
in the top menu bar.Click
Export
→Next
.Increase version number as applicable, and select Unmanaged, then click on
Export
.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.
Creating custom connectors in new environment
Note |
---|
Must be done before importing the solution. 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. |
On the left hand menu, navigate to
Data
→Custom Connectors
Click on
+ New
→Other
→Custom connector
.In the Connector Name field, type “APSR”.
Toggle the
Swagger Editor
to ON, delete all the code and copy/paste the code from the APSR.json file.Toggle the
Swagger Editor
to OFF.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).
Click
Create connector
.Click on the Test tab, then
+ New connection
.Enter the API Key and click
Create connection
.Repeat steps 3-9 to create the SIAPI connector using the SIAPI.json file.
**This API doesn’t require an API Key.Repeat steps 3-10 to create the SPAPI connector using the SPAPI.json file.
Repeat steps 3-10 to create the MTAPI connector using the MTAPI.json file.
Repeat steps 3-10 to create the TMAPI connector using the TMAPI.json file.
For all 5 connectors, share them with the organization.
Click
...
→Invite another user
→Share with org
→Save
.You can also give edit rights to other developers here.
Environment | Host | Base URL |
---|---|---|
Dev | /Saf-Sec-Sur/2/NDWL2-LWND2-API | |
QA | “ | “ |
Prod |
Expand | ||
---|---|---|
| ||
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
|
Import the solution
Click on
Solutions
on the left-hand menu and thenImport
in the top menu bar.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.Click
Next
twice and create a new connection for both Outlook and Dataverse.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.
Click
Import
and wait for the process to finish.
Importing SCRAM task data
Import data for Scram Task table from Scram_Task.csv file that is provided.
26. Select Scram Task table and opt for Get data from Excel
...
a) To add a time entry, the flow gets all the rows where the current timesheet is approved from the “Time Entries” table filtered via a FetchXML query to only get the rows where “Added to CRSM” is false and hours are not empty or null. Here’s the query:
Code Block | ||
---|---|---|
| ||
<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false"> |
...
<entity name="ap_timeentry"> |
...
<attribute name="ap_timeentryid" /> |
...
<attribute name="ap_timeid" /> |
...
<attribute name="createdon" /> |
...
<order attribute="ap_timeid" descending="false" /> |
...
<filter type="and"> |
...
<condition attribute="ap_addedtocrsm" operator="eq" value="0" /> |
...
<condition attribute="ap_timesheet" operator="eq" uitype="ap_timesheet" value="{@{triggerOutputs()?['body/ap_timesheetid']}}" /> |
...
<condition attribute="ap_employeelogin" operator="eq" value="@{triggerOutputs()?['body/ap_employeelogin']}" /> |
...
<condition attribute="ap_timecard" operator="eq" value="@{triggerOutputs()?['body/ap_reportingperiod']}" /> |
...
<condition attribute="ap_timeentryhours" operator="not-null" /> |
...
</filter> |
...
</entity> |
...
</fetch> |
b) Create a time entry record in the CRSM database.
...