Info |
---|
Steps to install APSD in D365 PowerApps platform |
...
Expand |
---|
title | Importing SCRAM task data |
---|
|
Go to the environment that has the master set of data for the SCRAM tasks. Currently, this is QA. On the left menu, go to Data → Tables , then open the Scram Tasks table. On the top menu, click on Data → Export data . Once the export has been successfully completed, click on Download exported data . Unzip the csv file. Switch to the environment you are deploying to. On the left menu, go to Data → Tables , then open the Scram Tasks table. On the top menu, click on Data → > beside Get data → Get data from Excel .  Upload the csv file from step 4. If there are any mapping issues, fix them.  Click Import . Wait for the process to complete, then verify that the data was imported.
|
Expand |
---|
title | Importing AP task data |
---|
|
Follow the same steps for Importing SCRAM task data using the AP Task table instead. |
Flows
The service principal account should be used for all connections to the DataVerse.
Expand |
---|
title | Timesheet Approval Rejected Email Notifications |
---|
|
Name: Timesheet rejected - Send email notification Description: This Power Automate Flow - TimeSheetNotificationstriggers when the “ap_timesheetstatus” field is modified to “Rejected”. The flow sends an email to the submitter. Name: Expense rejected - Send email notification Description: This Power Automate Flow triggers when the “ap_timsheetstatus” expensestatus” field is modified to “Rejected”. The flow sends an email to the submitter. Image RemovedName: Invoice rejected - Send email notification Description: This Power Automate Flow triggers when the “ap_invoicestatus” field is modified to “Rejected”. The flow sends an email to the submitter. |
Expand |
---|
title | 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 the “TMAPI” custom connector, specifically the following end points: Add a time entry 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> |
Create a time entry record in the CRSM database.

Add hours to time entry 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.
 Push Time Entry to CRSM Step inside flow TypeCode: Regular (REG), Travel (TH), Other (DH) Code Block |
---|
[
{
"ServiceRequestId": @{int(variables('ServiceRequestID'))},
"ServiceId": @{outputs('Get_a_row_by_ID')?['body/ap_serviceid']},
"ApproverNetworkId": @{triggerOutputs()?['body/ap_approvedby']},
"Comment": @{items('Apply_to_each_-_Push_to_CRSM')?['ap_comments']},
"SubmitterNetworkId": @{items('Apply_to_each_-_Push_to_CRSM')?['ap_employeelogin']},
"DateTime": @{items('Apply_to_each_-_Push_to_CRSM')?['ap_timeentrydate']},
"Hours": [
{
"Quantity": @{items('Apply_to_each_-_Push_to_CRSM')?['ap_timeentryhours']},
"TypeCode": "REG",
"IsBillable": @{items('Apply_to_each_-_Push_to_CRSM')?['ap_billable']},
"StatusCode": 2
}
]
}
] |
|
...