A rather strange problem.

I have a class x with the following code in the main method: static void main(Args args) { Object caller; ; switch(args.parmEnum()) { case ASMProposalChoice::Create : invoiceProposal = ASMInvoiceProposal::construct(ASMProposalChoice::Create); caller = args.caller(); invoiceProposal.invoiceProjId(caller.invoiceProjId()); invoiceProposal.contractId(caller.contractId()); invoiceProposal.contractObjId(caller.contractObjId()); invoiceProposal.counterId(caller.counterId()); invoiceProposal.poolId(caller.poolId()); invoiceProposal.assignmentId(caller.assignmentId()); invoiceProposal.caller(caller); invoiceProposal.invoiceType(caller.invoiceType()); break; case ASMProposalChoice::Update : invoiceProposal = ASMInvoiceProposal::construct(ASMProposalChoice::Update); caller = args.caller(); invoiceProposal.proposalId(proposalJour.ASMProposalId); invoiceProposal.invoiceProjId(proposalJour.ASMInvoiceProjId); break; case ASMProposalChoice::Automatic : invoiceProposal = ASMInvoiceProposal::construct(ASMProposalChoice::Automatic); break; } invoiceProposal.queryStart(); if (invoiceProposal.prompt()) invoiceProposal.run(); } Now the ASMInvoiceProposal::construct(ASMProposalChoice::Create); instantiates the ASMInvoiceProposal class. This class contains a private variable called caller which is of type Object. The caller method takes the caller object as a parameter, and initilizes the internal/private caller simply by setting the internal caller object variable equal to the input parameter. Thus it is a simple the caller in the main method is of type object as you can see, and the internal caller is also of type object. The class is called from a form via a menuitem. However Axapta reacts by issuing a run-time error telling me: “Wrong argument types in variable assignment”. The Axapta is Service pack 3 NO market pack. I am really going crazy here , 'coz I can’t find the problem. Can someone help me ? -------------- JaS

Hi

Hi Jacob, I think I may have the solution, for I’m getting this error frequently after installing SP3. The only thing you have to do is to go to the AOT, select your father class, right click, choose add-ins and compile forward. This may take a while depending on your data model, but afterwards,n everything will run smoothly. Success Gert Neetesonne Belgium