İş akışı onayını koddan yapmak

Merhaba

Ax2012′de iş akışını onaylamak için aşağıdaki örnek kodu kullanabilirsiniz.


static void FD_WorkflowWorkItemTable(Args _args)
{

    WorkflowWorkItemTable WorkflowWorkItemTable;
    ;

    WorkflowWorkItemTable = WorkflowWorkItemTable::findRecId(123434343);

    if(WorkflowWorkItemTable)
    {
        ttsBegin;
        WorkflowWorkItemActionManager::dispatchWorkItemAction(
           WorkflowWorkItemTable, // Work item record for which the action is being taken
           strFmt("Auto Approve by %1 ", curUserId() ), // Comment associated with this action
           curUserId(), //The target user of the action
           WorkflowWorkItemActionType::Complete,//The work item action type to take
           "PurchTableApprovalApprove", // The name of the menu item from which the action originated
           false // Flag denoting if this request originated from web or rich client
           );

        ttsCommit;
    }
}

Selamlar.

 
  • Trackback are closed
  • Comments (0)
  1. No comments yet.