lunes, 20 de octubre de 2014

Error closing inventory, AX 2009

Attempting to close inventory in an AX 2009 installation.

Error executing code: The method has been called with an invalid number of parameters.
Seguimiento de pila: Se ha llamado al método con un número no válido de parámetros.

(S)\Classes\InventMov_Vir_Transfer_Closing\checkDimPhysical
(S)\Classes\InventUpd_Financial\updateFinancialReceipt - line 28
(S)\Classes\InventUpd_Financial\updateNow - line 67
(S)\Classes\InventUpd_Financial\updateVirtuelTransferClosing - line 69
(S)\Classes\InventCostItemDim\updateModelAverage - line 198
(S)\Classes\InventCostItemDim\updateModel - line 18
(S)\Classes\InventCostItemDim\updateItem - line 74
(S)\Classes\InventCostItemDim\run - line 35
(S)\Classes\InventCostHelp\run - line 139
(S)\Classes\InventCostClosing\run - line 44
(C)\Classes\InventCostClosing\main - line 13
(C)\Classes\FormFunctionButtonControl\Clicked
(C)\Classes\FormMenuButtonControl\Clicked

Resolution:
Modify the InventMov_Vir_Transfer_Closing class, checkDimPhysical method and add two optional parameters, thereby having the same signature as it's parent class InventMovement which was modified by a patch in the SYP layer:
//<ZZZ> IDS 15/10/2014 Correct inventory close error.
//boolean checkDimPhysical(InventQty _qty, InventDim _inventDim, boolean finalCheck)
boolean checkDimPhysical(InventQty _qty, InventDim _inventDim, boolean finalCheck, boolean _showError = true, boolean _checkPalletLocation = true)
//</ZZZ> IDS 15/10/2014 Correct inventory close error.
{
    return true;
}

SYP Changes applied to the InventMovement.checkDimPhysical method signature


No hay comentarios:

Publicar un comentario