Error executing code: Wrong argument types in variable assignment.

Hello Guys,

I have this issue in AX 2012 r3 in shipment > functions > ship transfer order

Error executing code: Wrong argument types in variable assignment.

Stack trace

(C)\Classes\RetailCreateSpecificLabel\PrintLabels - line 36

(C)\Classes\InventTransferMultiShip\main - line 47


(C)\Forms\WMSShipment\Designs\DesignList\InventTransferShip\Methods\Clicked - line 3

I hope you can help me guys,

Thank you

First of all, recompile the class. If it doesn’t help, show us the code in question.

I already recompiled classes in the list…

Here is the for RetailCreateSpecificLable > Printlabel

void printLabel()


Args args = new Args();

MenuFunction CreateReportForLabelsMen = new MenuFunction(strfmt("%1",ReportName), MenuItemType::Output);






InventtransferMultiShip > Main

public static void main(Args _args)


InventTransferMultiShip inventTransferMultiShip;

InventTransferParmUpdate inventTransferParmUpdate;

SysFormRun_doRe sysFormRun_doRe;

boolean doFormCache;

if (_args.parmEnum() == RunChoose::Run)


inventTransferMultiShip = InventTransferMultiShip::construct();

switch( _args.dataset())


case tableNum(InventTransferTable) :


RunBaseMultiParm::initFromForm(inventTransferMultiShip, _args);

doFormCache = true;


case tableNum(WMSShipment) :


doFormCache = false;


default :

RunBaseMultiParm::initParm(inventTransferMultiShip); //Make sure parmId is set

inventTransferParmUpdate = inventTransferMultiShip.defaultParmUpdate();

inventTransferMultiShip.insertParmUpdate(inventTransferParmUpdate); //init and insert overall update table for this update




if (! inventTransferMultiShip.prompt())





if (doFormCache && _args && _args.caller())


sysFormRun_doRe = _args.caller();



// Print product labels from transfer order during ship

RetailCreateSpecificLabel::PrintLabels(_args, InventTransferStatus::Shipped, inventTransferMultiShip.parmId());







I can’t find the class FormfunctionButtonControl

That is a system class, you can find it under system documentation/classes.

The problem is here, C)\Classes\RetailCreateSpecificLabel\PrintLabels - line 36

This is a standard class, have you modified it?

You showed us a wrong method. The problem is in static method printLabels(), not in the instance method printLabel().

No I didn’t modified the print labels - I cant find the print label in system documentation

PrintLabels is the method in class RetailCreateSpecificLabel.

You could not find it in system documentation.

Is there any changes did in the method PrintLabels.

Place breakpoint here and check

I said the FormfunctionButtonControl is a system class.

What would be the possible solution for my problem,

Thank you

It’s difficult to know the cause unless someone has access to your system.

As i told in my previous reply just place break point and check what is the issue.

RetailCreateSpecificLabel::PrintLabels(_args, InventTransferStatus::Shipped, inventTransferMultiShip.parmId());

in the above line it is passing argument and i cant see your printlabel is accepting any, is there any parent class of RetailCreateSpecificLable class?