Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Version History

« Previous Version 5 Next »

Steps to install APSD in D365 PowerApps platform

 How to switch to classic D365

Click SolutionsAPSD...Switch to classic

  1. Navigate to Advance SettingsSecuritySecurity Roles

  2. Select Service Writer and perform a copy role

3. Create the following new roles,

case sensitive, for each one perform the same action from step 3:

a)      AP Engineer

b)      AP Clerk

c)       AP Manager

d)      AP Invoice Manager

4. Navigate to modern Power Apps UI and select the production 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

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

27.   Select the csv file and click on Map Columns

28.   Map Code, Name English and Name French columns

29.   Click Save changes and the Import. Wait for the process to complete. Verify the data was imported.

30.   Edit the Service Requests Canvas app

31.   When prompted select Don’t allow

32.   Remove all 5 connections and Office365User, too

33.   Add all of them back including Office365User, too

34.   Run App checker and make sure no errors are reported

35.   Save and publish the app

AP Task import

 

Steps to import AP Tasks:

 

  1. Prepare Excel with tasks in the following format

 

 

 

2. Navigate to the

AP Tasks table in target environment and select Get Data as shown below:

 

 

 

3. Click on “Get data from Excel” and the following screen should open. Choose the excel file that was prepared in step 1 and click import.

 

 

 

 

Flows (for timesheet notifications, approval and import all users)

 

Flow for Timesheet Approval Notifications:

 

Name: Flow - TimeSheetNotifications

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

 

 

 


 

Flow for Timesheet Approval – Add to CRSM:

 

Name: Flow - Push Approved Time Entries To CRSM

Description: This Power Automate Flow triggers when the “ap_timsheetstatus” field is modified to “Approved”. The flow uses “TMAPI” custom connector, specifically the following end points.

 

  1. Add a time entry

 

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:

 

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

 

 

2. Add hours to time entry

 

a)      This endpoint is used to create a record for adding hours for the time entry that was created in the previous step. Depending upon the “ap_timeentrytype” i.e. “Regular”, “Travel” or “Other”, corresponding action is called.

 

 

 

  • At the end of the flow, the flag “Added to CRSM” is set to true in the Time Entries table.

 

 

 

Flow for importing Users and setting Roles:

 

Name: Flow – Import Users and Roles

Description: This Power Automate Flow can be manually triggered to import users from an excel file (see screenshot below) into the Dynamics 365 “Users” table in the target environment. The Flow also associates users with their managers as listed in the Excel file and assigns them the roles as per the excel file. This excel file can be stored on the executing user’s OneDrive.

 

 

 

  • No labels

0 Comments

You are not logged in. Any changes you make will be marked as anonymous. You may want to Log In if you already have an account.