Cannot Post Posting Date Not In Your Range

Savatage
Member Posts: 7,142
Today we got the strangest error (for us) at least.
We got the Cannot Post due to not in the allowed range error.
Our Dates are 05/01/13 to 05/31/13. And the posting date is 05/01/13.
Debugging, I found in CU21 Item Jnl.-Check Line:
Why would they make it < & > and not <= & >=????
I'm allowing a certain date why wouldn't "equal" be ok? So if any old version users get that message you know know the issue & fix
Anyway I changed the allowed posting date back to 4/30 and it allowed me to post for 5/1. #-o
We got the Cannot Post due to not in the allowed range error.
Our Dates are 05/01/13 to 05/31/13. And the posting date is 05/01/13.
Debugging, I found in CU21 Item Jnl.-Check Line:
IF ("Posting Date" < AllowPostingFrom) OR ("Posting Date" > AllowPostingTo) THEN FIELDERROR("Posting Date",Text001);
Why would they make it < & > and not <= & >=????
I'm allowing a certain date why wouldn't "equal" be ok? So if any old version users get that message you know know the issue & fix
Anyway I changed the allowed posting date back to 4/30 and it allowed me to post for 5/1. #-o
0
Comments
-
You're supposed to get the error when the posting date is before the From Date, OR after the To Date, which is why there are no equal signs. That means that if the posting date is EQUAL to the From Date, you should NOT get an error message.
What you are saying is that your posting date is 5/1, but even though the From Date equals that value, you are STILL getting the error?0 -
I think you need to look at the variables. they probably are different values. And the reason might be that adjust entry is is being made to another entry. That entry posting date is not within the range.0
-
-
I haven't checked the code on 2009 - 2013 but if I set my range from one date to another, II would assume it would accept it.0
-
DenSter wrote:You're supposed to get the error when the posting date is before the From Date, OR after the To Date, which is why there are no equal signs. That means that if the posting date is EQUAL to the From Date, you should NOT get an error message.
What you are saying is that your posting date is 5/1, but even though the From Date equals that value, you are STILL getting the error?
yes - the debugger stops there.
so it being equal caused the error (IMHO) since changing the date back 1 day allowed us to post..
maybe it's a NAtive flaw0 -
Savatage wrote:It's not a big deal but I thought it was odd that my allowable posting date range is 05/01/2013 to 05/31/2013 ( we change it every month to be strict on postings) But that code only allows it to post from 05/02/2013 to 05/31/2013. I'd figure it was fixed on newer versions.
Daniel already covered this. The code is correct, you are just reading it wrong.
IF NOT (A<B)
is the same as
IF (A>=B)David Singleton0 -
You are correct. I was focusing on the wrong thing. That's what happens when you post after a bunch of beers at the Yankee game.0
-
Hi Savatage,
Very late reply.
Hope you sorted this one but just in case you haven't I had a similar problem.
Check that the Posting Date is not a closing date i.e. C05/01/130
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions