最新消息:ww12345678 的部落格重装上线,希望大家继续支持。

D365FO – 用指定员工开始层次结构审批 / D365FO – Start hierarchy approval with specific worker

网络文摘 William 137浏览 0评论
有时,客户希望从特定工作人员而不是从发起工作流程的人员开始层级审批,然后遍历层次结构。场景:
  • 发票从第三方进入FinOps并创建税务发票登记
  • 在税务发票登记行级别设置“ 已批准”字段
  • AP文员/管理员将这些发票分配给正确的工人进行审批
因此,在上述场景中,AP职员启动了工作流程,但工作流程不会将他/她的直线经理进行审批,而是将其分配给发票的所有者(已批准)。
There are times when clients want to start hierarchy approval from a specific worker and not from the one who initiated the workflow and then traverse up the hierarchy.
Scenario:
  • Invoices are coming from third-party into FinOps and creating tax invoice registers
  • Setting the Approved by field at tax invoice register line level
  • AP Clerk/Administrator assigns these invoices to correct worker for approval
So, in the above scenario, the AP clerk initiated the workflow but the workflow will not go his/her line manager for approval instead it will be assigned to the owner (approved by) of the invoice.
 
这就是我们想要实现的目标 - 添加一个新的开始
This is what we want to achieve - add a new Start from
此Start from list通过WorkflowHierarchyProviderHelper 类中的getSupportedDataType()填充  This Start from list get populated through getSupportedDataType() in  class WorkflowHierarchyProviderHelper
创建一个新的事件处理程序类并订阅该委托,如下所示。PS WFOwner是自定义创建的EDT。
Create a new event handler class and subscribe to the delegate as shown below. P.S. WFOwner is the custom created EDT.
class ECL_WorkflowHierarchyProviderHelperEventHandler
{
    [SubscribesTo(classstr(WorkflowHierarchyProviderHelper), delegatestr(WorkflowHierarchyProviderHelper, addAdditonalSupportedDataTypesDelegate))]
    static voidaddAdditonalSupportedDataTypesDelegate(Set _supportedDataTypes)
    {
        _supportedDataTypes.add(extendedTypeStr(WFOwner));
    }
} 添加上LedgerJournalTable一个新的领域,并分配WFOwner EDT它。LedgerJournalTable仅供参考,因为上述更改已针对供应商发票审批实施。 Add a new field on LedgerJournalTable and assign the WFOwner EDT to it. LedgerJournalTable is for reference as the above change is implemented for vendor invoice approval.
发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址