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, ...
Unanswered

Calculate SalesTotals for Return Orders.

(0) ShareShare
ReportReport
Posted on by
Hello Everyone, 

I am facing an issue on calculating the SalesTotals for return orders. 

Usually in normal Sales Orders , you can use the below class and get the amounts of the specific sales order:
 
SalesTotals             salesTotals;
AmountCur               totalsAmt;

salesTotals= SalesTotals::construct(_salesTable);
salesTotals.calc();


totalsAmt = salesTotals.totalAmount();

But for Return Orders type this is not calculating anything. 
And as i can see even from standard button "Totals" it also does not calculate anything in contrast of a normal sales order where it works properly.

I am wondering if this is because of the field in Sales line that the user put the quantity, and instead of salesLine.SalesQty which is in a normal sales order, is the salesLine.EXPECTEDRETQTY. 

Does anyone had a similar experience how to solve this?
 
Categories:
I have the same question (0)
  • Anwar Saheed Profile Picture
    40 on at
    Can you please describe the issue in detail.
     
    Are you facing the issue on Order Type - Sales order  or Returned Order
     
    Is it on AP- SO
     
    or in Project Module
  • CU04050713-1 Profile Picture
    on at
    Hello @Anwar Saheed 

    the issue is as i describe, is on Accounts Receivable Sales orders and more specifically on those which have SalesType::ReturnItem

     

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!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

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

#1
André Arnaud de Calavon Profile Picture

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

#2
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 564

#3
CP04-islander Profile Picture

CP04-islander 396

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans