Scenario:
When creating a new line in a journal after sorting the data in the grid users may see an unexpected voucher number proposed for the new line.
Resolution:
To resolve the issue 3 objects require a change (note that the affected journal will determine the Form that requires the change).
1. \Forms\LedgerJournalTransVendInvoice\Methods\ClassDeclaration
Before:
SOURCE #ClassDeclaration
class FormRun extends ObjectRun
{
QueryBuildRange ledgerJournalTransRange;
LedgerJournalEngine ledgerJournalEngine;
……
After:
RecId currentRecordForCreate;
2. \Forms\LedgerJournalTransVendInvoice\Data Sources\LedgerJournalTrans\Methods\create()
try
ledgerJournalTransEntityManager.getFormDataEventManager().beginEntityCreateEvent();
journalFormTrans.datasourceCreatePre();
……….
if (currentRecordForCreate != 0)
ledgerJournalTrans_ds.findRecord(LedgerJournalTrans::findRecId(currentRecordForCreate, false));
}
3. \Forms\LedgerJournalTransVendInvoice\Methods\task()
New Method:
public int task(int _taskId)
int ret;
;
if (_taskId == 260)
currentRecordForCreate = ledgerJournalTrans.RecId;
ret = super(_taskId);
return ret;
To which version does this apply to?