Can i get Sales Order totals for specific lines x++
i wanna get Sales Order totals for specific lines in sales order, i know how to use Salestotal class to get all salesorder total but i wanna get lets say some lines total and other not based on my criteriais this possible ?
Hi OmarAbdlhamed,
You can view the totals using the user interface of the system. Accounts receivable > orders >All sales orders >Click on the sales order number > Sales order tab > View group > click the ‘Totals‘ button.
And you can access the D365 sales order totals information using x++ code.
dynamics365musings.com/.../
Hi Judy
this action will give me all lines total
i mean if i have line
1
2
3
4
i need to get totals for only lines 1,2,3 i don't wanna 4 ,, is this possible using X++ ?
Yes you can count the number of loop and if it is your Id where total not required just skip that by using continue;
I think it's possible, the calculations rules are in the calc() method in class TradeTotals and you can try to add your own criteria based on his logic.
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
CA Neeraj Kumar 2,004
André Arnaud de Cal... 865 Super User 2025 Season 2
Sohaib Cheema 582 User Group Leader