bring another value from another form

Helo I have a scenerio like:

when I create ledger I select a salesId field and when I Posted the ledger I want to see same salesId on custtrans too,It shoulld init the sales Id to custtrans.

Should I wrote a method on custtrans’s table like initfromCustrans etc…

CustTrans.SalesId==LedgerJoournalTrans.salesId …likle this

or should I create a new relation on custtable and ledgerjournalTrans by salesId.

You mean the ledger journal right?

If so, you have to create the field in custVendTrans map and have your code in \Classes\CustVendVoucher\post

hi kranthi,I got ewrror message after this posting the ledger
Error executing code: The field with ID ‘0’ does not exist in table ‘CustTrans’.

I wrote this code on initCustVedMethod of class.
CustVendTrans.SalesId = LEdgerJournaltrans.SalesId;


Did you mapped the field properly in custVendTrans map? (look at the mapping node under custvendTrans map)

hi kranthi,i figured out the problem it was about custventrans map and I posted the journal but when I check the custtrans I could not see the salesId on custTrans

Does the method you are modifying has the correct ledgerJournalTrans record? Try debugging.

oh I traced and It comes with data on table but I can not see on form.I checked the table browser and saw the data but could not see on custtrans form

I add thw salesId filed to custTrans form,when I trace it I saw the value on table,so It inserts to the table but not form

Data is inserted into the table and Form shows the data from the relevant table. If you have added the field correctly and there is data in the table field, it should be showing in the form.