Skip to main content

Notifications

Supply chain | Supply Chain Management, Commerce
Unanswered

Warehouse management app

(1) ShareShare
ReportReport
Posted on by 6

can you please tell me how to solve this issue 

when i open custom menu item in  warehouse app it say "invalid execution mode"

 

  • CU27011407-0 Profile Picture
    CU27011407-0 6 on at
    Warehouse management app
    class 1::
    [WHSWorkExecuteMode(WHSWorkExecuteMode::ITVMIRequest)]
    public class ITPurchWHAVMIRequestProcessController extends ProcessGuideController
    {
        protected ProcessGuideStepName initialStepName()
        {
            return classStr(ITWHSWorkExecuteDisplayVMIRequest);
        }
        protected ProcessGuideNavigationRoute initializeNavigationRoute()
        {
            ProcessGuideNavigationRoute navigationRoute = new ProcessGuideNavigationRoute();
            navigationRoute.addFollowingStep(classStr(ITWHSWorkExecuteDisplayVMIRequest), classStr(ITPurchVMIRequestWHSControls));
          
            return navigationRoute;
        }
    }

    class 2::
    [ProcessGuideStepName(classStr(ITWHSWorkExecuteDisplayVMIRequest))]
    public class ITWHSWorkExecuteDisplayVMIRequest extends ProcessGuidePageBuilder
    {
       
       
        protected void addDataControls(ProcessGuidePage _page)
        {
            _page.addTextBox(ProcessGuideDataTypeNames::ItemId, "Itemid", extendedTypeNum(ItemId));
            //Fill details panel
            _page.addLabel(ProcessGuideDataTypeNames::RFTitle, 'Instructions:', extendedTypeNum(Description));
            _page.addLabel(ProcessGuideDataTypeNames::RFDescription1, "randam details", extendedTypeNum(Description));
        }
        protected void addActionControls(ProcessGuidePage _page)
        {
            #ProcessGuideActionNames
            _page.addButton(step.createAction(#ActionOK), true);
            _page.addButton(step.createAction(#ActionCancelExitProcess));
        }
    }

    class 3::
    [ProcessGuidePageBuilderName(classStr(ITPurchVMIRequestWHSControls))]
    class ITPurchVMIRequestWHSControls extends ProcessGuideStep
    {
        protected ProcessGuidePageBuilderName pageBuilderName()
        {
            return classStr(ITWHSWorkExecuteDisplayVMIRequest);
        }
        protected boolean isComplete()
        {
            WhsrfPassthrough pass    = controller.parmSessionState().parmPass();
            ItemId          itItemid = pass.lookup(ProcessGuideDataTypeNames::ItemId);
            return InventTable::exist(itItemid);
        }
        protected void validateControls()
        {
            ItemId          itItemid = processingResult.fieldValues.lookupStr(ProcessGuideDataTypeNames::ItemId);
            if (!InventTable::exist(itItemid))
            {
                throw error(strFmt("ItemId does notexists ", itItemid));
            }
            super();
        }
    }

    my code can you please check
  • CU27011407-0 Profile Picture
    CU27011407-0 6 on at
    Warehouse management app
    This form is only intended for testing purposes and is not supported in production scenarios.

    Invalid work execute mode.

    i tried but saying like this only
  • MichaelTorres Profile Picture
    MichaelTorres 76 on at
    Warehouse management app
    The Invalid work execute mode error usually happens because the menu item's execution mode in the Warehouse Management App isn’t set up correctly.

    To fix this:

    1. Go to Warehouse management -> Setup -> Mobile Device -> Mobile -> Device menu items in Dynamics 365. Check the custom menu item and ensure the work execution mode matches its purpose (work for processing tasks, indirect activity for non-work tasks).

    2. If it processes work, ensure it’s linked to a valid work template under warehouse management -> Setup -> Work -> Work templates.

    3. For custom menu items, confirm any related code or extensions are correctly configured.

    After adjusting the settings, test again. If it still doesn’t work, check system logs or involve a technical consultant to troubleshoot further.

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,965 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,779 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans