axapta - Dynamics AX 2009: Add a field to InventJournalTrans, propagate to InventTrans -


i need add additional field inventjournaltrans, after posting show in inventtrans table. field reference column record in table. method(s) need modify make behavior happen?

currently, have added fields both tables , modified form allow user enter , save new field. can't seem find bottom of rabbit hole on actual posting inventtrans occurring.

ideally, should a:

inventtrans.reasonrefrecid = inventjournaltrans.reasonrefrecid;

assignment statement before the

inventtrans.insert();

call. have clue on at?

the link above contain solution -- have included code page in case page disappears or no longer becomes available. gl00mie answering on site , providing answer.

you should create new inventmovement method this:

public mynewfieldtype mynewfield() {     return mynewfieldtype::defaultvalue; // suppose new field enum } 

then modify \classes\inventmovement\initinventtransfrombuffer

void initinventtransfrombuffer(inventtrans _inventtrans, inventmovement _movement_orig) {     // ... append line end of whatever else in method     _inventtrans.mynewfield            = this.mynewfield(); } 

and overload new method in inventmov_journal class:

public mynewfieldtype mynewfield() {     return inventjournaltrans.mynewfield; } 

Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -