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 :
Microsoft Dynamics AX (Archived)

Total Discount in return order

(0) ShareShare
ReportReport
Posted on by 352

Hello everybody

Is there any way to get % of total disount when making a return order basing on an initial invoice (the initial invoice is containing a total discount). So my need, is when making a return on this invoice, to get the % from it and apply it on the return !

Thanks.

*This post is locked for comments

I have the same question (0)
  • Albrecht Prieler Profile Picture
    857 on at

    Hello,

    i have tried it out cause i was unsure, are you using Total Discount Group? Was it added manually on SO?

    My Observation was, that the copy function on Return order does not copy total Discount Group.

    Thats why it happen, i would check out if there is a Hotfix for that.

    Otherwise you can adapt that, could not take a Long time for a good developer

  • Yohann Rolland Axcible Profile Picture
    3,111 on at

    Hi,

    The standard allows you to retrieve sales order lines and header in return orders. But only price line details are retrieved. It makes sens as you can have several lines from different sales order in the same return order.

    If you want to do what you want, you will need to use line discount instead of total discount.

    If it's not possible, you may considering a customization but handle this carefully you will need to specify the policy  for specific cases : when you will try to retrieve several SO lines issued from different SO -> which total discount you want to apply, etc.

  • JauB Profile Picture
    352 on at

    Hi All,

    Yes I'm using Total Discount Group. And I put it automatically in SO (we are using an other Android application for making orders which is interfaced with AX).

    And as said Albrecht, the problem is that this Group is not copied into Sales return.

    As first case, we will make returns only for one order (one sales order return = one sales order), so I will see how I can do it specifically in X++.

    Keep in touch :)

  • Verified answer
    JauB Profile Picture
    352 on at

    After few hours, I solved my problem in that way :

    When calling "Find Sales Order", I selecet my initial order and on Click "OK" I Override clicked method in that way :

    void clicked()
    {
    
    
        CustInvoiceJour    _CustInvoiceJour;
        SalesTable         _salesTable;
        SalesTable         _salesTableCurrent;
    
        super();
    
        _CustInvoiceJour = getFirstSelection(CustInvoiceJour_DS);
        _salesTable = SalesTable::find(_CustInvoiceJour.SalesId);
    
    
        _salesTableCurrent = SalesTable::find(callerSalesTable.SalesId, true);
        _salesTableCurrent.EndDisc = _salesTable.EndDisc;
        _salesTableCurrent.update();
    
    
    
    }


    I saw also that i can not select more than one order. Otherwise, a message is displayed : 

    "Only one order header can be designated when copying order header.". I think that is a standard message ! which is good for me, because as you said, if i can select more than one order and they have different Total Discount Group ... I don't see how to do it in this case :)

    Problem solved for me :)

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 > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 26

#2
Michel ROY Profile Picture

Michel ROY 14

#3
imran ul haq Profile Picture

imran ul haq 8

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans