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 :
Supply chain | Supply Chain Management, Commerce
Suggested Answer

Due Date Automatically Caluculation in X++

(0) ShareShare
ReportReport
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
    10 on at

    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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Leaderboard > Supply chain | Supply Chain Management, Commerce

#1
Laurens vd Tang Profile Picture

Laurens vd Tang 123 Super User 2026 Season 2

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 107 Super User 2026 Season 2

#3
Aayush Tiwari Profile Picture

Aayush Tiwari 46

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans