Query on Error - Posting Date not within Your Range of Allowed Posting Dates - Nav 4 SP2

Hi Forum, I have a strange one here. The User is setup to Allow Posting From 30/10/06 and and has a blank Allow Posting To. In GL the dates are a blank Allow Posting From and 31/12/06 in the Posting To. He has created 2 Purchase Orders both with the same dates in Header (Order, Expected, Posting/Taxpoint and Document are all 28/11/06. He can post 1 of them but not the other as he gets the above error and I dont see why this should be the case. Has anyone come across this or knows why this should happen?

I suggest that you turn the debugger on and see where the code is faulting, then you might be able to see what date it is looking at.

Here is the code that is used to validate the posting date :

IF (AllowPostingFrom = 0D) AND (AllowPostingTo = 0D) THEN BEGIN
AllowPostingFrom := UserSetup.“Allow Posting From”;
AllowPostingTo := UserSetup.“Allow Posting To”;
IF (AllowPostingFrom = 0D) AND (AllowPostingTo = 0D) THEN BEGIN
AllowPostingFrom := GLSetup.“Allow Posting From”;
AllowPostingTo := GLSetup.“Allow Posting To”;
IF AllowPostingTo = 0D THEN
AllowPostingTo := 12319999D;
EXIT((PostingDate < AllowPostingFrom) OR (PostingDate > AllowPostingTo));

Fairly easy:

Variant 1: Either define BOTH or NONE of the dates

Variant 2: Change the VALIDATE triggers in the GL Setup to update the User dates

Variant 3: Change the code to enable combining the dates from both tables.

Hi Thomas, good to hear from you. I thought that it was due to Variant 1. I got the Administrator to do just that and its OK now. I only raised this question because it seemed to behave in such a strange manner i.e allowing some Orders to post and disallowing others when all the dates were the same on the orders. Thanks too to JohnCon for your help. Paul