Something like this:
PS : if an entry has a remaining amount, it is Open. So I put a filter (and currentindex) on Open. This should give better reading performance.
recCustLedgerEntry.RESET;
recCustLedgerEntry.SETCURRENTKEY(Open);
recCustLedgerEntry.SETRANGE(Open,TRUE);
recCustLedgerEntry.SETFILTER("Document Type",'%1|%2'
recCustLedgerEntry."Document Type"::Invoice,
recCustLedgerEntry."Document Type"::Bill);
IF recCustLedgerEntry.FINDSET THEN
REPEAT
CLEAR(recNewTable);
recNewTable.TRANSFERFIELDSrecCustLedgerEntry);
or
recNewTable."Field 1" := recCustLedgerEntry."Field 1";
recNewTable."Field 2" := recCustLedgerEntry."Field 2";
...
recNewTable.INSERT(FALSE);
UNTIL recCustLedgerEntry.NEXT = 0;
Regards,Alain Krikilion No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
You can create a codeunit and put it in the OnRun-trigger.
Or a report and put it in the OnPreReport or OnPostreport trigger.
Or in a form in the OnOpen-trigger. Or in a function that is called by a button on the form.
There are so many possibilities.
Regards,Alain Krikilion No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
Comments
PS : if an entry has a remaining amount, it is Open. So I put a filter (and currentindex) on Open. This should give better reading performance.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
Could you tell me where should i put that?
i munst confess that i'm not a programer.. i'm trying to...
O:)
Or a report and put it in the OnPreReport or OnPostreport trigger.
Or in a form in the OnOpen-trigger. Or in a function that is called by a button on the form.
There are so many possibilities.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!