Hii,
We have a custom field for PurchID in our LedgerJournalTrans table and displayed on LedgerJournalTransVendPaym Form. This customization is working ok.
This customization is up to LedgerJournalTrans level only.
Now we want to update PurchID for already posted payment journals. I can do it from SQL update statement successfully, but need to do it in a form on button click in x++;
When I try to update from Form button click in x++ it gives following error.
"Cannot edit a record in Journal lines (LedgerJournalTrans). Journal batch number: VVX-002658, VPJ-000234.
The SQL database has issued an error."
while select forupdate ledgerJournalTrans where ledgerJournalTrans.JournalNum == journalNum && ledgerJournalTrans.Voucher == voucher
{
if(ledgerJournalTrans)
{
ttsbegin;
ledgerJournalTrans.PurchId = purchId;
ledgerJournalTrans.PurchNote = poNote;
ledgerJournalTrans.update();
ttscommit;
}
}
Please guide, how to update ledgerJournalTrans line custom field only.
Thanks,