Skip to main content

Notifications

Announcements

No record found.

Supply chain | Supply Chain Management, Commerce
Suggested answer

Due Date Automatically Caluculation in X++

Posted on by 10

Hi Readers!

I would like to know how to calculate due date automatically on created form in X++.

I created new dialog form which can enter TransDate and DueDate. I would like DueDate to be calculated based on the modified TransDate.

This dialog form was created for report parameter.

For example, if I change transdate value, dudate would be calculated automatically.The way to calculate is based on paymterm table.

However, I could not find any method of due date calculation based on the transdate on created dialog form.

Those forms just use for printout report, so even though transdate and duedate on created dialog form are updated, the table, custtrans, should not updated. Just I want to show those updated transdate and duedate value on the report tempolary.

Does anybody know which method should I use and how to use the method to solve this?

pastedimage1633105460074v1.png
Thank you for your help.

  • Suggested answer
    MayO Profile Picture
    MayO 10 on at
    RE: Due Date Automatically Caluculation in X++

    I find this answer!

    Due Date= PaymTerm::find(PaymentTerm).due(transDate);

    I just use this code, mentioned above, to solve my questions.

    Then, it works with d365 FO!! If someone have same issue, I recommend to use this!

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans