28.03.2024, 03:02 | #1 |
Участник
|
dynamicsaxinsight: D365: How to get last workflow approver in X++
Источник: https://dynamicsaxinsight.wordpress....prover-in-xpp/
============== Purpose: Demonstrates how can get the last workflow approver for purchase orders in X++. Application: Dynamics 365 for Finance and Operations Business requirement: Get the last workflow approver for purchase orders in X++. Solution: We can use the code below to get the last workflow approver for purchase orders. The code extends PurchTable table to add a method to get the last workflow approver. Code [ExtensionOf(tableStr(PurchTable))]internal final class MK_PurchTable_Extension{ /// /// Gets the last workflow approver. /// /// Muhammad Anas Khan public UserId getLastWorkflowApprover() { WorkflowTrackingStatusTable workflowTrackingStatusTable; WorkflowTrackingTable workflowTrackingTable; UserInfo userInfo; UserId ret; select firstonly workflowTrackingTable join workflowTrackingStatusTable where workflowTrackingTable.WorkflowTrackingStatusTable == workflowTrackingStatusTable.RecId && workflowTrackingStatusTable.ContextTableId == this.TableId && workflowTrackingStatusTable.ContextRecId == this.RecId && workflowTrackingTable.TrackingType == WorkflowTrackingType::Approval join userInfo where workflowTrackingTable.User == userInfo.id; if (workflowTrackingTable.RecId) { ret = userInfo.id; } return ret; }} Источник: https://dynamicsaxinsight.wordpress....prover-in-xpp/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. |
|
|
|