Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Answered

How to get the caller menuitemName in custom workflow submit button.

(0) ShareShare
ReportReport
Posted on by 135

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');

}

}

  • Vishu Beniwal Profile Picture
    Vishu Beniwal 135 on at
    RE: How to get the caller menuitemName in custom workflow submit button.

    Hi I already tried this but didn't work.

  • Verified answer
    WillWU Profile Picture
    WillWU 22,350 on at
    RE: How to get the caller menuitemName in custom workflow submit button.

    Hi Vishu,

    Please try to change

    formRun.args().menuItemName() == menuItemActionStr(LSSalesOrderReturnWFTypeSubmitMenuItem)

    to

    formRun.args().menuItemName() == menuitemdisplaystr(YourFormMenuItem)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,431 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,503 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans