Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

Remaining Balance on Customer Documents - SQL

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I am trying to run a detailed debtors listing through SQL to provide a workflow for credit controllers without needing to log in to Nav.

I cannot find the table/view which shows remaining balance for customer ledgers, I have tried $Cust_ Ledger Entry]  and $Detailed Cust_ Ledg_ Entry]

*This post is locked for comments

  • Suggested answer
    I Gusti Made Ari Profile Picture
    I Gusti Made Ari 3,594 on at
    RE: Remaining Balance on Customer Documents - SQL

    Hi, remaining amount is calculated field (no physical field for it in SQL)  . it is calculated from Detailed Cust. Ledger Entry linked by entry no.

    Below is the sample script on how to calculate :

    SELECT

         CLE.[Customer No_]

         ,CLE.[Document No_]

         ,SUM(DCLE.Amount) as 'Remaining Amount'

     FROM [dbo].[CRONUS New Zealand Ltd_$Cust_ Ledger Entry] CLE

     LEFT OUTER JOIN [dbo].[CRONUS New Zealand Ltd_$Detailed Cust_ Ledg_ Entry] DCLE ON DCLE.[Cust_ Ledger Entry No_] = CLE.[Entry No_]

     GROUP BY  CLE.[Customer No_],CLE.[Document No_]

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Remaining Balance on Customer Documents - SQL

    <deleted>

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans