10 January 2011

Add a field in AP-payment journal lines & vendTrans Table it has to update once we done posing Task

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

2 comments:

  1. "Argument '_projId' is incompatible with the required type." I am getting this error when i followed the above steps.Please help.

    ReplyDelete
  2. Hi,
    I 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.

    ReplyDelete

Give me the commetns and solutions

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->...