如何在 X++ 中将采购申请的工作流程状态从已完成重置为以编程方式提交?

发布于 2024-07-14 19:36:06 字数 232 浏览 4 评论 0原文

MS Dynamics AX 2009:

我需要从采购订单屏幕执行此操作,因此我只有 PurchLines 表中可用的采购申请编号。

我们将非常感谢您的帮助,因为网上还没有任何可用的内容(我可以找到),并且 AX 2009 教程中缺少课程。

所有有用的答案肯定会得到我的赞同。

编辑:目的是当单击采购订单屏幕上的按钮时,强制现有工作流程在“已提交”阶段的采购申请上重新执行。

MS Dynamics AX 2009:

I need to do this from the Purchase Order Screen, so I only have the Purchase Requisition number available from the PurchLines Table.

Your help would be really greatly appreciated as there is nothing yet on the net available (that I can find) and there are missing classes in the AX 2009 Tutorials.

All helpful answers will definitely get an upvote from me.

Edit: Purpose is to force the existing workflow to re-execute on the Purchase Requisition from "Submitted" stage when a button is clicked on the Purchase Order Screen.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

笑忘罢 2024-07-21 19:36:06

我找到了答案(代码)再次将其提交到工作流程:

workflowCorrelationId = Workflow::activateFromWorkflowTemplate(workflowTemplateName,recId,note,NoYes::No,'userid');

I found the answer (code) to submit it to the workflow again:

workflowCorrelationId = Workflow::activateFromWorkflowTemplate(workflowTemplateName,recId,note,NoYes::No,'userid');

殤城〤 2024-07-21 19:36:06

这将重置 PurchReqTable 中的工作流程状态和状态字段,但不会执行任何工作流程逻辑:

PurchReqTable::setWorkflowState(PurchReqTable::find(PurchLine.PurchReqId).RecId, PurchReqWorkflowState::Submitted);

This will reset the workflow state and status fields in PurchReqTable, but it won't execute any workflow logic:

PurchReqTable::setWorkflowState(PurchReqTable::find(PurchLine.PurchReqId).RecId, PurchReqWorkflowState::Submitted);
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文