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

Community site session details

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

how to get Closing balance in X++ Code

(2) ShareShare
ReportReport
Posted on by
Hello everyone,  
I have a scenario that requires me to display the closing balance for the employee.  
I want to obtain the closing balance for each employee through the main account
 
Best regards.
Categories:
  • André Arnaud de Calavon Profile Picture
    on at
    how to get Closing balance in X++ Code
    Hi Ali,
     
    Can you please elaborate on your question? What is exactly your definition of "the closing balance for the employee"?
  • Ali AbdAlNasser Profile Picture
    on at
    how to get Closing balance in X++ Code
    Hi @André Arnaud de Calavon.
    I want to retrieve the Closing balance value from the Trial balance screen.
    However, this screen has a temporary table that stores data when the calculate button is clicked.
  • André Arnaud de Calavon Profile Picture
    on at
    how to get Closing balance in X++ Code
    Hi Ali,
     
    Note that the screen and a trial balance report are both using a single data provider. You can run the same data provider as being used on the Trial balance screen to get the details in a temporary table. Then you can query the temporary table for closing balances.
  • Verified answer
    Ali AbdAlNasser Profile Picture
    on at
    how to get Closing balance in X++ Code
     
    I solved my problem by using the same code found in the Calculate button on the Trial Balance screen.
     
    ledgerTrialBalanceTmp::calculateBalances_V2(ledgerTrialBalanceTmp, dimensionHierarchyName,systemDateGet(),systemDateGet(),
        false,false,false,postingLayer);
     

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…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

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

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans