Hi,
I have a workflow set on Accounts Payable Payment Journal. The workflow has 2 stages. 1st stage is approved.
I want to approve the 2nd stage (Also I'd like to know how to approve on only 1 stage at time or both stages together)
Here's my code:
static void Job61(Args _args) { LedgerJournalTable ljt; LedgerJournalCheckPost post; WorkflowWorkItemTable workflowWorkItemTable; while select ljt where ljt.JournalNum=='XYZ-001' { while select workflowWorkItemTable where (workflowWorkItemTable.Type == WorkflowWorkItemType::WorkItem) && (workflowWorkItemTable.Status == WorkflowWorkItemStatus::pending) && workflowWorkItemTable.RefRecId == ljt.RecId && workflowWorkItemTable.RefTableId == ljt.TableId { info(int642str(workflowWorkItemTable.RecId)); WorkflowWorkItemActionManager::dispatchWorkItemAction( workflowWorkItemTable, "Approved via X++ on Mr. ABC's Request", curUserId(), WorkflowWorkItemActionType::Complete, "LedgerJournalTable5", false); } } }
I'm getting this error on running it:
I also tried changing
'LedgerJournalTable5' to 'WorkflowConfigurationVend'
Right clicking and personalizing the workflow:
Any tips appreciated.
*This post is locked for comments