Skip to main content

Notifications

Microsoft Dynamics AX (Archived)

Inventory transfer order cannot change from/to warehouse in Edit mode

Posted on by 155

On the Inventory transfer order, when clicking Edit button, the From & To warehouses are not editable. I have searched the code on the form InventTransferOrders, the table InventTransferTable, and the form handler PmfFrmCtrl_InventTransferOrders & the class that it extends PmfFromCtrl. I cannot find where it sets the fields to read only. When clicking New you can change these values. I also subscribed to events in EventHandler class but no effect.  Please help.

    [FormEventHandler(formStr(InventTransferOrders), FormEventType::Initialized)]
    public static void InventTransferOrders_OnInitialized(xFormRun sender, FormEventArgs e)
    {
        element       = sender;
        element.viewEditModeHelper().EditModeSwitched += eventhandler(MSM_InventTransferOrdersForm_EventHandlers::PostRecordEdit);
    }
    public static void PostRecordEdit()
    {
        //  I can add my logic here that gets invoked after the global edit task
        FormControl         LineViewHeader_InventLocationIdFromStringEdit;
        FormControl         LineViewHeader_InventLocationIdToStringEdit;
        if (element.viewEditModeHelper().isInEditMode())
        {
            LineViewHeader_InventLocationIdFromStringEdit   = element.design(0).controlName("LineViewHeader_InventLocationIdFrom");
            LineViewHeader_InventLocationIdToStringEdit   = element.design(0).controlName("LineViewHeader_InventLocationIdTo");
            LineViewHeader_InventLocationIdFromStringEdit.allowEdit(true);
            LineViewHeader_InventLocationIdToStringEdit.allowEdit(true);
        }
    }

*This post is locked for comments

  • Suggested answer
    Satish Panwar Profile Picture
    Satish Panwar 14,645 on at
    RE: Inventory transfer order cannot change from/to warehouse in Edit mode

    That look like a much better approach. Thanks Kurt.

  • Kurt Warner Profile Picture
    Kurt Warner 155 on at
    RE: Inventory transfer order cannot change from/to warehouse in Edit mode

    I think I agree, we wanted to have a button on service call to load an inventory transfer and display the form in edit mode. Since we cannot change the warehouse once the record is created (from new button "Transfer order" on a service call), I think the way to proceed is to create dialog form when they click the button to ask for the From/To warehouse before creating the InventTransferTable record which is done on the onClick event of the button. Thanks...

  • Verified answer
    Satish Panwar Profile Picture
    Satish Panwar 14,645 on at
    RE: Inventory transfer order cannot change from/to warehouse in Edit mode

    Hi Kurt,

    While you may be able to find where read only mode is setup for warehouse, I wouldn't recommend customization in this area. If something is not setup right, user can always create a new transfer order and delete existing one. It's not only warehouse change, there may be more to it because of transit warehouse and inventory transactions.

    Setting fields to read only is standard functionality.

    Thanks,

    Satish Panwar

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!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

New! Quick response templatesâš¡

Save time with the new custom templates!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,064 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans