Hello dears!
I'm trying to create a grid where it has different records from different datasources.
the grid has the reference table id and reference record id of the records coming from different datasources.
and I am trying to make a short cut for the approval process for the workflow. there is a custom approve button on the grid which once clicked it will approve the work item in the workflow.
using this method:
WorkflowWorkItemActionManager::dispatchWorkItemAction( workflowWorkItemTable, //Workflow Work item table record "Approved in custom button!!!", //Comment curUserId(), //Current user Id WorkflowWorkItemActionType::Complete, // Approve action type "PurchLineApprovalApprove");//Action Menu Item Name //This last parameter is where i'm having the issue
I want to make this code as variable as possible, but the last parameter is where I'm having my issue.
I need to get the workflow approve action menu item name through x and not hard code it with a string like what I'm doing in the code above for example: "PurchLineApprovalApprove".
This is a screenshot for where the value I need to get is located:
Because, I'm dealing with custom workflows, and if later someone created a new workflow and assigned the new workflow with a different "action menu item name", the above hard coded code will not work.
also I don't want to use a switch case for the different datasources in the grid. if it's possible to get the value through x , this will reduce the code lines for this task.
is it possible to get the value of the workflow approval "Action Menu Item" property through x knowing the Rec Id and table id of the record?
I was able to locate the workflow and the workflow version for the record using the RecId and TableId of the record.
But is it possible to get the "Approve action menu item" property value?
Sorry for my English and thanks in advance!