Categories
NAV 2018 Tips & Tricks

“The Posting Date is not within your range of allowed posting dates” when Adjust Cost Item Entries

What date is the error “The Posting Date is not within your range of allowed posting date”

Have you experienced when posting, then you got this error?

The Posting Date is not within your range of allowed posting dates.

Usually, this is because the Posting Date in the transaction is falling outside of the Allowed Posting Date.

But in this case, we have checked and confirmed that the Posting Date is OK. So, what is the problem?

Please check the Inventory Setup, for Automatic Cost Adjustment. If it is other than “Never”, then we can be sure that the error message is coming from the Adjust Cost Item Entries (ACIE) process.

So, the solution is to run the ACIE process first, then back to post the transaction again.

But, wait. I don’t know, what Date should I open.

Let’s change some code to better inform that:

Codeunit 21 Item Jnl.-Check Line
LOCAL CheckAllowedPostingDate(ItemJnlLine : Record "Item Journal Line")
...
IF ("Posting Date" < AllowPostingFrom) OR ("Posting Date" > AllowPostingTo) THEN
ERROR(InformativePostingDateRangeErr, "Posting Date"); //Add this line
//FIELDERROR("Posting Date",Text001) //Remove this line

With Text Constant: InformativePostingDateRangeErr: The Posting Date %1 is not within your range of allowed posting dates.

This way, we get the better informative error message:

The Posting Date 28-01-21 is not within your range of allowed posting dates.

Better, isn’t it?

This code is intended for NAV 2018. If you are newer, you can read here.

One reply on ““The Posting Date is not within your range of allowed posting dates” when Adjust Cost Item Entries”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s