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 lead time

(0) ShareShare
ReportReport
Posted on by
I have this code:
 
SalesCalcAvailableDlvDates salesCalcAvailableDlvDates = SalesCalcAvailableDlvDates::newCommonSalesDlvDateType(salesTable, fieldNum(SalesTable, ReceiptDateRequested));
 
TransDate effectiveOrderDate    = salesCalcAvailableDlvDates.effectiveOrderDate();
LeadTime leadTime               = salesCalcAvailableDlvDates.salesLeadTime(true);
 
if (salesTable.ReceiptDateRequested < (effectiveOrderDate + leadTime))
{
    salesTable.ReceiptDateRequested = (effectiveOrderDate + leadTime);
}
 
The lead time calculation is incorrect when it is near the end of the same day, the receiptDateRequested is left the same day; I need a future working day. Does someone know how I can improve that code?
I have the same question (0)
  • Subra Profile Picture
    787 on at
    Hi 

    What you mean by the receiptdaterequested is left the same day?

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 April Top 10 Community Leaders

These are the community rock stars!

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

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 694

#2
André Arnaud de Calavon Profile Picture

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

#3
Subra Profile Picture

Subra 518

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans