Hello Everyone,
I have created a custom workflow which is working fine then I got a requirement to change the caption of formContol of submit workflow button, so I write code on run method of WorkflowSubmitDialog but the thing is I want to change the caption only for one legal entity so & just for that custom workflow, I tried to get the menuItemName of caller but I'm not able to achieve that, Pl suggest me a way though that I can change the caption only for one legal enity and only for that custom workflow.
[PostHandlerFor(formStr(WorkflowSubmitDialog), formMethodStr(WorkflowSubmitDialog, run))]
public static void WorkflowSubmitDialog_Post_run(XppPrePostArgs args)
{
FormRun formRun = args.getThis();
if(curExt() == 'UK30' && formRun.args().menuItemName() == menuItemActionStr(LSSalesOrderReturnWFTypeSubmitMenuItem)
{
FormCommandButtonControl okBtn = formRun.design(0).controlName('Submit');
okBtn.text('@LSWorkFlow:sbmtctrol');
}
}