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)\Classes\FormFunctionButtonControl\Clicked

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

args.record(rboInventItemLabel);

args.object(recordSortedList);

args.parmEnumType(enumnum(boolean));

args.parmEnum(true);

CreateReportForLabelsMen.run(args);

}

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) :

inventTransferMultiShip.parmCalledFromWMS(false);

RunBaseMultiParm::initFromForm(inventTransferMultiShip, _args);

doFormCache = true;

break;

case tableNum(WMSShipment) :

inventTransferMultiShip.initParmFromWMSShipment(_args);

doFormCache = false;

break;

default :

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

inventTransferParmUpdate = inventTransferMultiShip.defaultParmUpdate();

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

inventTransferMultiShip.parmCalledFromWMS(false);

break;

}

if (! inventTransferMultiShip.prompt())

{

return;

}

inventTransferMultiShip.runOnServer();

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

{

sysFormRun_doRe = _args.caller();

sysFormRun_doRe.doFormCache(inventTransferMultiShip.packRecs());

}

// Print product labels from transfer order during ship

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

}

else

{

RunBaseMultiParm::runSpecial(_args);

}

}

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?