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