web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

Get records from tempDB

(0) ShareShare
ReportReport
Posted on by 15

I want to implement this functionality but vendBalanceProvisionalTmpProcesing is always empty, i know it is empty because it is tempDB :

 while select AccountNum,PostingProfile from vendProvisionalBalanceTmpProcessing
            {
                select sum(AmountCur) from vendTrans
                    where vendTrans.AccountNum == vendProvisionalBalanceTmpProcessing.AccountNum
                    && vendTrans.PostingProfile == vendProvisionalBalanceTmpProcessing.PostingProfile
                    && vendTrans.TransDate >= _fromDate
                    && vendTrans.TransDate <= toDate;
            
                    tempSum += vendTrans.AmountCur;
            
                select sum(AmountMST) from vendTrans
                    where vendTrans.AccountNum == vendProvisionalBalanceTmpProcessing.AccountNum
                    && vendTrans.PostingProfile == vendProvisionalBalanceTmpProcessing.PostingProfile
                    && vendTrans.TransDate >= _fromDate
                    && vendTrans.TransDate <=toDate;
            
                    tempSum+= vendTrans.AmountMST*ledgerParameters.EonExchangeRate;
            
                    tmpValue.Amount = tempSum;
                    tmpValue.AccountNum = vendTrans.AccountNum;
                    tmpValue.PostingProfile = vendTrans.PostingProfile;
                    tmpValue.doInsert();    
            
            }


But there are 2 scenarios where i can access to vendProvisionalBalanceTmpProcessing.AccountNum :

insert_recordset tmpValue
        (AccountNum, PostingProfile, Amount)
        select AccountNum
        from vendProvisionalBalanceTmpProcessing
            group by AccountNum
        join PostingProfile, sum(AmountMST) from vendTrans
            group by PostingProfile
            where vendTrans.AccountNum == vendProvisionalBalanceTmpProcessing.AccountNum
                && vendTrans.PostingProfile == vendProvisionalBalanceTmpProcessing.PostingProfile
                && vendTrans.TransDate < _fromDate;
    update_recordset vendProvisionalBalanceTmpProcessing
        setting OpeningBalance = tmpValue.Amount
        join tmpValue
            where tmpValue.AccountNum == vendProvisionalBalanceTmpProcessing.AccountNum
                && tmpValue.PostingProfile == vendProvisionalBalanceTmpProcessing.PostingProfile;


I have the same question (0)
  • Martin Dráb Profile Picture
    237,976 Most Valuable Professional on at

    Didn't you meant to ask a question?

    If it's not clear to you, you won't find anything a TempDB table buffer if you didn't insert records to the same buffer, or didn't link it with data from another buffer by linkPhysicalTableInstance().

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 456 Super User 2025 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 429 Most Valuable Professional

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 239 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans