views:

86

answers:

2

I have added an object member to InventMovement class and have created one parameter method for the same but following line of code is popping up above error:

movement.parmProdJournalId(this.JournalId);

JournalId parmProdJournalId(JournalId _prodJournalId = prodJournalId)
{
    ;
    prodJournalId =  _prodJournalId;
    return prodJournalId;
}

After adding the object member and parameter method I have also compile forward InventMovement but no success. Will appreciate if anyone of you could help me in this regard

Rgds

PS: I am doing the same thing which is mentioned in this blog post: http://www.artofcreation.be/2009/04/04/wrong-argument-types-in-variable-assignment/

A: 

It is kind of strange, should work.
I could not reproduce your problem, but once had a similar problem. Solved it by re-compiling and synchronizing every involved class and table (more than once).
Also make sure nobody else is using any of these objects, maybe best is to restart the AOS.

EDIT (after comment on question):
Another possibility: it seams that you are also mixing JournalId and ProdJournalId.
I think the parameter and return value of parmProdJournalId should also be ProdJournalId.
Just try this one:

ProdJournalId parmProdJournalId(ProdJournalId _prodJournalId = prodJournalId)
{
    ;
    prodJournalId =  _prodJournalId;
    return prodJournalId;
}

could not try it myself since I could'nt reproduce the error

Carlos Heuberger
you mean restart the AOS or the machine?
haroonattari
the AOS... sometimes (compiled) code is cached in it (as I heard). Also editing/adding to the answer.
Carlos Heuberger
+1  A: 

I stopped the AOS, renamed AXAPD.AOI file and restarted the AOS. This resolved the problem. I got this solution from other forum where also I posted this question.

haroonattari
curious: have you tried without renaming the file?
Carlos Heuberger
@haroonattari: you should accept your answer since it helped you. Just click the checkbox to the left of the answer below the upvotes/downvotes count.
Carlos Heuberger