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

Community site session details

Session Id :
Dynamics 365 Community / Forums / Finance forum / Customer Aging Report ...
Finance forum

Customer Aging Report calculation according to a custom field

(0) ShareShare
ReportReport
Posted on by 282

Hi all,

I have added date field (Actual Due Date) in CustTrans Table and i want calculate Customer Aging Report according to customized field (Actual Due Date).

Only if criteria is Due Date.

Please give suggestion if any one have idea for the same.

Thanks in Advance.

Thanks,

Amol

 

I have the same question (0)
  • Ludwig Reinhard Profile Picture
    Microsoft Employee on at
    RE: Customer Aging Report Customized D365

    Hi Amol,

    Can you let us know what the difference between the default D365FO due date an your 'actual due date' is?

    Many thanks,

    Ludwig

  • Amol@ Profile Picture
    282 on at
    RE: Customer Aging Report Customized D365

    Hi Ludwig,

    Thanks for reply.

    Actual Due Date field we have added as per client requirement and it auto calculate based on terms of payment and trans Date.

    Actual due date is differ from Due Date(System Date).

    Thanks,

    Amol

  • Suggested answer
    Ludwig Reinhard Profile Picture
    Microsoft Employee on at
    RE: Customer Aging Report calculation according to a custom field

    Hi Amol, 

    I do not understand this requirement because the customer aging report already has three different date values for the calculations of the aging. 

    custaging.jpg

    If your date differs from this then have a look how calculations are made in the report based on whether (1) the transaction date, (2) due date or (3) document date are calculated. 

    Should not be to difficult to identify. 

    Best regards, 

    Ludwig

  • Amol@ Profile Picture
    282 on at
    RE: Customer Aging Report calculation according to a custom field

    Hi Ludwig,

    As per my understanding CustAgingCalculation class used for aging calculation.

    Please let me know in which class or method i should write a code.

    Thanks,

    Amol

  • Amol@ Profile Picture
    282 on at
    RE: Customer Aging Report calculation according to a custom field

    Hi Ludwig,

    As per my understanding CustAgingCalculation class used for aging calculation.

    Please let me know in which class or method i should write a code.

    Thanks,

    Amol

  • Suggested answer
    Satish Panwar Profile Picture
    14,671 Moderator on at
    RE: Customer Aging Report calculation according to a custom field

    Hi Amol,

    There are so many classes that start with CustAging... you need to debug and determine where to write the code. Please try to understand the context below before you try to make changes, we are not discouraging you to make changes but suggesting that you take a different approach to this modification.

    Here is my understanding:

    1. You have added a new field on custTrans.

    2. Reason is because due date field (standard AX) is not working as expected and may not be correct.

    3. Standard AX aging report uses standard due date field but not that due date field itself is not working, you want to change this report to use your custom column.

    Here is the recommendation:

    1. Instead of adding the field in custTrans and then modifying the aging report, review / make changes to the system so that due date (standard AX) field starts to work. If you need to extend some logic, do to this field.

    This will make sure :

    1. You don't have to customized aging report which has it's own complexity.

    2. Due date field is used/displayed on other reports/forms etc. and it won't create any confusion on which date is correct.

    Thanks,

    Satish Panwar

    Please take time to click 'Yes' against the answers that help you guide in right direction to help other community members.

  • Amol@ Profile Picture
    282 on at
    RE: Customer Aging Report calculation according to a custom field

    Hi,

    I have done the below code but not working.

    Anyone please guide or correct below code.

    [Extensionof(classStr(CustVendAgingCalculation))]

    final class CustVendAgingCalculation_Extension

    {

       protected void selectOpenTransactions(CustVendAgingProcessingTmp _agingProcessingTmp)

       {

           //var                     custVendTrans     = this.setCustVendTransBuffer();

           var                     custVendTransOpen = this.setCustVendTransOpenBuffer();

           CustVendTransAging      customersVendors  = this.customersVendors;

           CustTrans               custTrans;        

           next selectOpenTransactions(_agingProcessingTmp);

           // set TransDate everywhere and update based on AgedBy later

           if(agedby == DateTransactionDuedate::DueDate)

           {

               insert_recordset _agingProcessingTmp

                       (AccountNum, TransRecId, CurrencyCode, TransOpenRecId, Amount, AmountCur, AmountReporting)

                   select AccountNum from customersVendors

                       join RecId, CurrencyCode from custTrans

                           where custTrans.AccountNum == customersVendors.AccountNum

                                   && custTrans.ActualDueDate <= balanceAsOfDate

                                   && (!custTrans.Closed || custTrans.Closed >= balanceAsOfDate)

                       join RecId, AmountMST, AmountCur, ReportingCurrencyAmount  from custVendTransOpen

                           where custTrans.RecId == custVendTransOpen.RefRecId

                                   && custVendTransOpen.TransDate <= balanceAsOfDate;

            }

       }

    }

    Thanks,

    Amol

  • Lobbi Profile Picture
    21 on at
    RE: Customer Aging Report calculation according to a custom field

    One thing I want to point out regarding this modification.

    Be 100% sure that you are not changing the calculation classes so they stop to work for standard scenarios.

    I agree with Ludwig, you simply have to debug and see where the standard due date is populated and make an extension there for your code.

    Remember to test ALL scenarios also in different companies/legal entities using cust aging. Especially if they use the standard calculation

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Finance

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans