Personalized Community is here!
Quickly customize your community to find the content you seek.
Choose your path Increase your proficiency with the Dynamics 365 applications that you already use and learn more about the apps that interest you. Up your game with a learning path tailored to today's Dynamics 365 masterminds and designed to prepare you for industry-recognized Microsoft certifications.
Visit Microsoft Learn
2020 Release Wave 2Discover the latest updates and new features to Dynamics 365 planned through March 2021.
Release overview guides and videos Release Plan | Preview 2020 Release Wave 2 TimelineWatch the 2020 Release Wave 2 virtual launch event
Ace your Dynamics 365 deployment with packaged services delivered by expert consultants. | Explore service offerings
Connect with the ISV success team on the latest roadmap, developer tool for AppSource certification, and ISV community engagements | ISV self-service portal
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance TechTalks | Customer Engagement TechTalks | Upcoming TechTalks
If you have been paying any sort of attention, you will know that I do quite a lot of work with the Workflow 2.0 module of Microsoft Dynamics GP.
We have created a number of reports in the past which allows the status of transactions or card going through a Workflow Approval process; to simplify matters somewhat, I created a SQL function which can be called with the Workflow Type Name and the Workflow Business Object Key and have the approval status returned.
CREATE FUNCTION dbo.uf_AZRCRV_GetWorkflowApprovalStatus(@WorkflowTypeName CHAR(50),@WfBusObjKey CHAR(20))
Created by Ian Grieve of azurecurve|Ramblings of a Dynamics GP Consultant (http://www.azurecurve.co.uk)
This code is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0 Int).
Returns Workflow Approval status of a specified workflow item.
Requires input parameters of WorkflowTypeName and WfBusObjKey
Valid Workflow Type Names are (as of Microsoft Dynamics GP 2016 R2):
General Ledger Batch Approval
Receivables Batch Approval
Payables Batch Approval
Payables Transaction Approval
Purchase Order Approval
Purchase Requisition Approval
Employee Profile Approval
Employee Skills Approval
Payroll Direct Deposit Approval
Payroll Timecard Approval
Payroll W4 Approval
Expense Report Approval
Smartlist Designer View Approval
SELECT TOP 1
CASE WHEN ['Workflow History'].Workflow_Action = 1 THEN
WHEN ['Workflow History'].Workflow_Action = 2 THEN
WHEN ['Workflow History'].Workflow_Action = 3 THEN
WHEN ['Workflow History'].Workflow_Action = 4 THEN
WHEN ['Workflow History'].Workflow_Action = 5 THEN
WHEN ['Workflow History'].Workflow_Action = 6 THEN
WHEN ['Workflow History'].Workflow_Action = 7 THEN
WHEN ['Workflow History'].Workflow_Action = 8 THEN
WHEN ['Workflow History'].Workflow_Action = 9 THEN
WHEN ['Workflow History'].Workflow_Action = 10 THEN
WF30100 AS ['Workflow History']
['Workflow Master'].WF10002 AS ['Workflow Master']
['Workflow Master'].WorkflowInstanceID = ['Workflow History'].WorkflowInstanceID
['Workflow Master'].Workflow_Type_Name = @WorkflowTypeName
['Workflow Master'].WfBusObjKey = @WfBusObjKey
['Workflow History'].DEX_ROW_ID DESC)
GRANT EXECUTE ON uf_AZRCRV_GetWorkflowApprovalStatus TO DYNGRP
This view can be called from a SmartList created using either SmartList Designer, SmartList Builder, via a Reporting Services or Excel Report or any other type of report.
Read original post SQL Function To Return Workflow Approval Status at azurecurve|Ramblings of a Dynamics GP Consultant
Business Applications communities