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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Can i get Sales Order totals for specific lines x++

(0) ShareShare
ReportReport
Posted on by 48

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 criteria

is this possible ?

I have the same question (0)
  • Suggested answer
    huijij Profile Picture
    19,811 on at

    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.

    484684.png

    And you can access the D365 sales order totals information using x++ code.

    dynamics365musings.com/.../

  • OmarAbdlhamed Profile Picture
    48 on at

    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++ ?

  • Suggested answer
    Bharani Preetham Peraka Profile Picture
    3,634 Moderator on at

    Yes you can count the number of loop and if it is your Id where total not required just skip that by using continue;

  • huijij Profile Picture
    19,811 on at

    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.

    22655671.png

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 512 Super User 2026 Season 1

#2
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 386

#3
Adis Profile Picture

Adis 259 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans