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 :
Small and medium business | Business Central, N...
Suggested answer

automatically change the posting invoice date

(1) ShareShare
ReportReport
Posted on by 8
is there a way to automatically change the posting invoice date to the actual date it was posted? we do over 100 invoices a day and manually changing the date is another step in an already long process. 
 
When I try to get a daily sales report, its all incorrect because the posting date is incorrect. 
 

 
I have the same question (0)
  • Suggested answer
    Pallavi Phade Profile Picture
    621 on at
    automatically change the posting invoice date
    Namaste ,
     
    In Sales Invoice , You need to ensure Document Date is correct as it was when document was created and it has impact on Payment Terms which you set with customer . Posting date is when you post the document
     
     
     
    To Ensure Posting Date is always WorkDate or Today . You can derive it from Sales & Receivables Setup
     
    By Default Workdate is today and in anycase Workdate changes then only way is to customize .
    Below way will ensure posting date is always Today .
     
    AL Code::
    EventSubsrciber :: Codeunit 80 - "Sales Post"  , Event -OnBeforePostSalesDoc 
    Salesheader."Posting Date " = Today() ;
     
    If you feel this helpful , please verify the answer
     
    Regards
    Pallavi Phade
     
     
     
     
     
     
  • Suggested answer
    KasparsSemjonovs Profile Picture
    4,577 Super User 2025 Season 2 on at
    automatically change the posting invoice date
    Default posting date set to Work Date would solve this if the invoices are created and posted within the same day.
    If it is on different days, then You can use Batch posting of Purchase Invoices.
    For example, if You change status to Released only for invoices that are ready to be posted, You can use this as a filter, place the checkmark to Replace Posting Date and VAT Date, and enter the new Posting date to be used on all invoices that will be posted.
    But be aware of the warning message:
     
    So better to try it out in a Sandbox environment or test company, to see how the currency rates are updated.
     
  • Suggested answer
    Mohana Yadav Profile Picture
    60,721 Super User 2025 Season 2 on at
    automatically change the posting invoice date
    You can achieve it with a small customization
     
        [EventSubscriber(ObjectType::Codeunit, Codeunit::"Sales-Post", 'OnBeforePostSalesDoc', '', false, false)]
        local procedure OverridePostingDate(var SalesHeader: Record "Sales Header"; PreviewMode: Boolean; CommitIsSuppressed: Boolean)
        begin
            SalesHeader."Posting Date" := WorkDate();
        end;
  • Suggested answer
    Valentin Castravet Profile Picture
    28,503 Super User 2025 Season 2 on at
    automatically change the posting invoice date
    There's nothing out of the box.
     
    You can either ensure users change it every time, or customize the system to do it for you.
     
  • Suggested answer
    Sahan Hasitha Profile Picture
    816 on at
    automatically change the posting invoice date
    hi
     
    1. Change Setup (Standard, No Code)
    In Sales & Receivables Setup → field Default Posting Date:
    • Set to Work Date instead of Document Date.
    • Then, when you post, BC will always use the system Work Date (usually today).
    • If you want “actual posting day = today,” just keep your Work Date = Today (default).
    2. Control via Work Date
    If you want to “backdate” a whole day’s worth of posting (e.g. posting yesterday’s invoices today), you can set Work Date once at the beginning of the session, and all postings take that date.
    3. Customization (AL Extension)
    If your process is more complex, a simple AL extension can be built to:
    • Override Posting Date at posting time.
    • Automatically set it to Today’s Date (CurrentDateTime).
      This removes human error completely.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
Sumit Singh Profile Picture

Sumit Singh 2,857

#2
Sohail Ahmed Profile Picture

Sohail Ahmed 2,687 Super User 2025 Season 2

#3
Jeffrey Bulanadi Profile Picture

Jeffrey Bulanadi 2,203

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans