OnRun(VAR Rec : Record "Sales Header")
IF PostingDateExists AND (ReplacePostingDate OR ("Posting Date" = 0D)) THEN BEGIN
"Posting Date" := PostingDate;
VALIDATE("Currency Code");
END;
IF PostingDateExists AND (ReplaceDocumentDate OR ("Document Date" = 0D)) THEN
VALIDATE("Document Date",PostingDate);
. . .
my darkness is, when and where those vars 'PostingDateExists' and 'ReplacePostingDate' assigned or called?
please help. thank you.
Kind regards, Joe Marselo | see my NAV blog
joemarselo.wordpress.com | twitter
@joemarselo 0
Answers
PostingDateExist is a function that is called as codeunit 80 is executed. It is not called from a different location. It is used to check if the user has rights to post using the Posting Date (see User Rights Setup) and to check if the Posting Date is allowed according to the G/L Setup.
ReplacePostingDate is set when you use Batch Invoicing or Combine Shipments. Check the Options Tab and Help from these Reports to see what it does.
Regards
PostingDateExists is a Boolean variable in CU 80 not a function
It is set when the function SetPostingDate is called from a function external to CU 80.
As you can see SetPostingDate does not check any user rights.
SetPostingDate is usually called by the batch posting functionality
SetPostingDate allows you to set a consistent posting date and, if required, a consistent document date on a batch of orders during posting.
Steve
Thanx thanx thanx ... Maximus , Spost