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

Custom service taking long time to return (sum of total reporting currency amount) and (count of transactions) against each main account

(0) ShareShare
ReportReport
Posted on by 170

Hi everyone , I have written a custom service based on client requirement. In the service, I am fetching data from generalJournalAccountEntry table, but its response time is too much that service times out when testing through Postman. This is the code, I am using for fetching data. How to get faster data

while select count(RecId), sum(ReportingCurrencyAmount) from generalJournalAccountEntry
group by generalJournalAccountEntry.MainAccount
join RecId from generalJournalEntry
where generalJournalEntry.RecId == generalJournalAccountEntry.GeneralJournalEntry
&& (generalJournalEntry.AccountingDate >= reqDoc.parmStartDate()
&& generalJournalEntry.AccountingDate <= reqDoc.parmEndDate())


{
MainAccount mainAcc = MainAccount::find(generalJournalAccountEntry.MainAccount);

f3GlExpensesRespDocument = new F3GlExpensesRespDocument();

f3GlExpensesRespDocument.parmNumberOfExpenses(generalJournalAccountEntry.RecId);
f3GlExpensesRespDocument.parmTotalExpenseAmount(expenseAmount);
f3GlExpensesRespDocument.parmGlCode(mainAcc.MainAccountId);
f3GlExpensesRespDocument.parmSuccess(true);

glExpensesList.addEnd(f3GlExpensesRespDocument);
}

I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    301,075 Super User 2025 Season 2 on at

    Hi Uzair,

    Can you explain the exact customer requirement? Do you need to have the count of all accounting entries? Inquiring the accounting transactions in this way is far from recommended. Microsoft provides an option to export table data to data lake and then consume it into reports.

    Note that the table DimensionFocusBalance contains cumulated balances per date. Using this table would be a lot faster for retrieving balances, but it does not have the number of transactions per account.  

  • uzk_dynamics Profile Picture
    170 on at

    Hi André , thanks a lot for the response. DimensionFocusBalance works great for retrieving balances but the problem is that client need count of transaction as well, and that causes performance issue. The client has web application and he wants to integrate main account wise transaction data. Now like dimensionfocusbalance, is there any other class or table alternative that I can use to access count faster as well ?

  • Mariano Gracia Profile Picture
    on at
    The problem is the size of the ledger transactions table, custom services are made to be used in synchronous scenarios, in your case I don't think it can be feasible, what if they call the service asking for the whole year transactions?, as André has told you, you can use datalake, it's a very good option when you have a huge amount of records, as it is cheaper than BYOD which was used in the first versions of Dynamics. Is it so important to use a custom service?
  • uzk_dynamics Profile Picture
    170 on at

    Thanks Mariano for the response. I agree with your advice. I will discuss with my team regarding data lake solution

  • André Arnaud de Calavon Profile Picture
    301,075 Super User 2025 Season 2 on at

    Hi Uzair,

    Please keep us informed when you discussed the data lake solution direction with your team.

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
Martin Dráb Profile Picture

Martin Dráb 503 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 278 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans