Task
Add a field in AP-payment journal lines it has to update once we done posting Click here
i have created a new field in vendtrans table. that field is available in LedgerJournalTrans table also.
Whenever i am doing AccountsPayment->Payment Journal->Post. the record gets stored in the vendtrans table.
(Before posting the record gets stored in the ledgerjournalTrans table and after posting the record is created in vendtrans table.) Now i want to store the value of my newly created field in vendtrans table.(that value gets stored in ledgerjournaltrans, but sfter posting when the same record is created in vendtrans table,but the newly created field value is empty in vendtrans table)
-
Follow these setups.
1. Add the field to the custVendTrans Map
2. Create a new mapping in the VendTrans of custVendTrans Map
CustVendTrans.ProjId == VendTrans.ProjId
3. Class - CustVendVoucher
In the Class declaration add a variable
ProjId updateProjId;///Kranthi
4. Add a new method to CustVendVoucher class
ProjId parmUpdateProjId(ProjId _projId = updateProjId)
{
;
updateProjId = _projId;
return updateProjId;
}
5. In the initCustVendTrans methid of CustVendVoucher class add this line
custVendTrans.ProjId = updateProjId;
6. Class - VendVoucher -> in the newVendVoucherJournal method of vendVoucher class place the below line of code
vendVoucher.parmUpdateProjId(_ledgerJournalTrans.ProjId);
7. Compile the two classes
8.Right click on the CustVendVoucher class and Add-Ins -> "Compile Forward" - which will compile all the classes inherited from this class
This blog is for Dynamics AX (AXAPTA) Developers,this will help you for your development issues. This site contains some Microsoft Dynamics AX X++ Codes for use in your day to day use.
Subscribe to:
Post Comments (Atom)
Ledger Voucher creation Framework and x++ code to create ledger voucher
Please click her for MS reference file Below is the out of the box example reference and code. SalesInvoiceJournalPostSubBill_Extension-...
-
{ "Message" : "Please verify that the user is valid and set up correctly." } Sol: System Administration > Se...
-
Please click here to access Custom Workflow step by step process:
-
FormRun formRun = sender.formRun(); Object inventTrans_ds = formRun.dataSource(formDataSourceStr(InventMarking,InventTransO...
"Argument '_projId' is incompatible with the required type." I am getting this error when i followed the above steps.Please help.
ReplyDeleteHi,
ReplyDeleteI have added one field in ProjTable so after posting projectinvoice data coming in ProjProposalJour Table. Now I want update this field into CustTrans So it will look into Customer transction.