Hi Irving,

Use false as parameter value when calling newJournalNum function. It's because you use the code not in a form. If makeDecisionLater parameter is set to true and you did not commit it, then Axapta will never update the active number as used number. Thus, when Axapta clean up the number sequence list periodically, active numbers will then be released to become free ones(dafault is after 1 day period). As the numbers become free, then it will cause those numbers being used again.

Hope this explanation helps you.


Irving <[EMAIL PROTECTED]> wrote:
Hi

I import records directly into the Invoice Register Journal and in
the process I have to get a journal number for the imported records.

I do this like this:
    newJournalNum= false;
    if (!ledgerJournalTable.journalNum)
    {
        ledgerJournal= new LedgerJournal();
        if (ledgerJournal)
        {
            ledgerJournalTable.journalNum =
ledgerJournal.newJournalNum(true);
            newJournalNum= true;
        }
    }


It seems to go fine, but after a while I get an error when I try to
create a new Invoice Register Journal, it tells me that the number
is already used.
When I go to Basis/Setup/number sequence and find the number
sequence for the Invoice Register Journal and select the button
clean up/Current, I'll get a list of all the journal numbers I have
used and I can see that the status is Free or Active. But I'm
looking at posted journals!

It looks like I have to do more than just pick a new number, do you
know what I have to do?

Regards

Irving








Best regards,


Sonny Wibawa Adi
MBS Certified Professional - Axapta 3.0 Technical
MCSD.NET
MCAD.NET


Yahoo! DSL Something to write home about. Just $16.99/mo. or less

Sharing the knowledge on Axapta.
Visit www.frappr.com/axapta for axapta friends.




YAHOO! GROUPS LINKS




Reply via email to