Versions Compared

Key

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

...

Expand
titleHow to switch to classic D365

Click SolutionsAPSD...Switch to classic

...

Expand
titleGranting access to the environment to other developers

Migrating the security roles

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

  2. Select Service Writer and perform a copy role

    Image Modified

...

  1. Create the following new roles,

...

  1. case sensitive

...

  1. .

    • 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

...

  1. 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

Image RemovedImage Removed

...

  1. 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. Click ExportNext.

  5. 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.

  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 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.

Environment

Host

Base URL

Dev

http://wwwappstestext.tc.gc.ca

http://ncdtmsaapp.azurewebsites.net

/Saf-Sec-Sur/2/NDWL2-LWND2-API
/Corp-Serv-Gen/5/SIAPI-ISAPI-DEV
/Corp-Serv-Gen/5/SPAPI-PSAPI-DEV
/Saf-Sec-Sur/13/MTAPI-INT
/

QA

Prod

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).

    Image Added
  7. Click Share.

    Image Added

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.

    Image Added
  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.

Importing SCRAM task data

  1. 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
languagexml
<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.

...