Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

"Outer Join" and "Next" Statement,

Posted on by 2,983

I have 2 AX 2012 R3 environments, with different Kernel Builds. I would like to know what is the expected behaviour of this situation:

In class FormletterJournalPost(SalesInvoiceJournalPost).post()  we call selectFormletterJournalTrans():

select forupdate formletterJournalTrans
        where formletterJournalTrans.JournalId           == formletterJournal.JournalId
           && formletterJournalTrans.InternalJournalId   == formletterJournal.InternalJournalId
           && formletterJournalTrans.OrderId             == formletterJournal.OrderId
           && formletterJournalTrans.TransDate           == formletterJournal.TransDate
           && formletterJournalTrans.NumberSequenceGroup == formletterJournal.NumberSequenceGroup
        join forupdate salesLine
            where salesLine.InventTransId                == formletterJournalTrans.InventTransId
        outer join salesParmLine
            where salesParmLine.ParmId                   == custInvoiceJour.ParmId
               && salesParmLine.TableRefId               == salesParmTable.TableRefId
               && salesParmLine.SalesLineRecId           == salesLine.RecId
               && salesParmLine.PackingSlipId            == formletterJournalTrans.PackingSlipID
        outer join inventTable
            where inventTable.ItemId                     == salesLine.ItemId;

Later in the same post method, we call  

protected void nextFormletterJournalTrans()
{
    next formletterJournalTrans;
}


So in one environment (kernel 6.3.1000.2457), this sets the next record for "formLetterJournalTrans" and also for "SalesParmLine". However, in the new kernel (6.3.3000.111) environment, it only sets the "formLetterJournalTrans". 

I was expecting to also get the next "SalesParmLine". Any ideas on what could be causing the different behaviour?

*This post is locked for comments

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans