Workflow Approval in MS Teams - Dynamics 365 Finance & Operations
Muhammad Usama Yameen
MS Dynamics AX/D365FO | MCP | Technical Consultant at Mazik Global
In this blog post, I'll explain how to set up the workflow approval process for Dynamics D365 FO directly from MS Teams. Specifically, we'll focus on utilizing the general journal workflow for approvals within Teams.
Workflow for General journal already configured in Dynamics 365 Finance and Operation which will use in business event in step 2.
Step 1: Create the new Flow
Go to the https://make.powerautomate.com/ and create new flow and select the Triger "When a Business Event occurs", New Flow will create.
Step 2: Fill the values in the Business event
Fill the values in the event :
Instance: Select the URL of environment
Category: Workflow workitem
Business event: search the work flow which will use in team approval(which created in FO)
Legal entity: legal entity.
Step 3: Add Parse JSON connector
Add the new step in flow of "Parse JSON" connector.
Navigate to D365 FO again and go to the Business Events Catalog form (located at System administration > Setup > Business events > Business events catalog). In the endpoints section, there will be new end point created
Step 4: Add Execute action
Add new step in flow of execute action of Fin & ops app
Step 5: Add condition
Add new step in flow and select "condition" connector:
领英推荐
select the value of execution action
Step 6: Add action If yes, "Start and wait for an approval"
Add new step in flow and select "Start and wait for an approval" connector
Approval type: Approve/Reject - First to respond
Title: Add expression "body('Parse_JSON')?['WorkflowDocument']"
Assigned to: Add expression body('Parse_JSON')?['WorkflowUserEmail']
Step 7: Add Apply to each
Add new step in flow and select "Apply to each" connector
Step 8 : Add Execute action
Add new step in flow and select "Execute action" connector
Instance: Select the URL of environment
Action: WorkflowWorkItems-complete
WorkflowWorkItemInstanceId: select expression and enter "body('Parse_JSON')?['WorkflowWorkItemInstanceId']
Outcome: Outcome response of Start and wait for an approval connector
RunAsUser: select expression and enter body('Parse_JSON')?['WorkitemOwner']
Step 9: Final step
Once all the steps are completed, simply click on the save button, create the new general journal and submit it to the workflow. The following screen will then appear on Teams, Click on approve button, workflow will approve!
Thank you for taking the time to read the article.