Sunday, January 9, 2011

Updating The vendTrans Table

Hi the below code help you to insert custom created field values from a journal(LedgerJournalTrans) to the vendTrans table.

The insertion and updation of the vendTrans fields is done with the help of CustVendTrans Map

Follow the below setups when you add a new field to the ledgerJournalTrans and update it to vendTrans table...


1. Add the field to the custVendTrans Map - before that add field to ledgerJournalTrans and vendTrans.
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

Hope this code will help you...

1 comment: