23.06.2010, 20:05 | #1 |
Участник
|
workflowax: How to auto-submit record into workflow
Источник: http://workflowax.wordpress.com/2010...into-workflow/
============== Just this past week I had a request from one of my blog readers asking how to automatically submit a record into Dynamics AX Workflow without making use of the standard submit button. E.g. on a specific event such as on completion of an RFQ to submit a PR to workflow. We’ve had this type of request from clients before and its actually relatively simple to accomplish. Check out the PurchReqWorkflow class, method: submit. You basically only need to execute the following line to kick off any workflow. Workflow::activateFromWorkflowTemplate(this.parmWorkflowTemplateName(),purchReqTable.RecId,this.parmWorkflowComment(),activatingFromWeb,SysCompanyUserInfo::emplId2UserId(purchReqTable.Requisitioner));Adapted for your auto-submission and placed in the relevant section of code, one would use something like the following: Workflow::activateFromWorkflowTemplate(‘PurchReqApproval’, //Template namepurchReqTable.RecId, //Record id of the document that you are submitting,‘Auto-Submitted into workflow’, //A comment for the workflow history to know something about how this was submitted,false, //This document wasn't submitted from the web,Curuserid()); // The user who should become the workflow originatorI you find this useful. Happy Daxing Jonathan Источник: http://workflowax.wordpress.com/2010...into-workflow/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. |
|