web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

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

(0) ShareShare
ReportReport
Posted on by 157

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

I have the same question (0)
  • Verified answer
    Satish Panwar Profile Picture
    14,671 Moderator on at

    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

  • Kurt Warner Profile Picture
    157 on at

    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...

  • Suggested answer
    Satish Panwar Profile Picture
    14,671 Moderator on at

    That look like a much better approach. Thanks Kurt.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Priya_K Profile Picture

Priya_K 4

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#3
Ali Zaidi Profile Picture

Ali Zaidi 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans