Skip to main content

Notifications

Microsoft Dynamics AX (Archived)

Select Date Wise Net Balance

Posted on by Microsoft Employee

Dear Expert

Below query date criteria is not working i am getting todate amount from database

please advice on query...Thanks

Afridi

display Amount VendorTotalCreditOnGrid(VendTrans _VendTrans)
{


real VendTotalCredit;
VendTrans vendTransLocal;

select sum(AmountCur) from vendTransLocal
where vendTransLocal.AccountNum==_VendTrans.AccountNum && vendTransLocal.AmountCur<0
&& vendTrans.TransDate <= TxtDate.dateValue();

VendTotalCredit = vendTransLocal.AmountCur;

return VendTotalCredit;


}

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Select Date Wise Net Balance

    Thanks Dick I got my result

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Select Date Wise Net Balance

    I Just Put the Local in query thanks for identifying

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Select Date Wise Net Balance

    Thanks Dick

    Yes it is control on form and EDT is TransDate  and I droped Display Method on grid

    to calculate amount

  • Verified answer
    Dick Wenning Profile Picture
    Dick Wenning 8,705 on at
    RE: AOT Date Wise Net Balance

    I assume that txtDate is a control on a form?

    is this one of EDT type TransDate?

    also

    select sum(AmountCur) from vendTransLocal

    where vendTransLocal.AccountNum==_VendTrans.AccountNum && vendTransLocal.AmountCur<0

    && vendTransLocal.TransDate <= TxtDate.dateValue();

    VendTotalCredit = vendTransLocal.AmountCur;

    return VendTotalCredit;

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,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans