Changing the Posting Date will also change the Document Date. Did you have a look at the code in the OnValidate-trigger of the field Posting Date how this is achieved?
PS: be sure that doing it in a similar way for the Shipment Date that calling the OnValidate-trigger of Shipment Date makes sense.
Changing the Posting Date will also change the Document Date. Did you have a look at the code in the OnValidate-trigger of the field Posting Date how this is achieved?
PS: be sure that doing it in a similar way for the Shipment Date that calling the OnValidate-trigger of Shipment Date makes sense.
i am not able to find any code under onValidate trigger of Posting Date.
Open table 36 in design mode and search for Posting Date field (field 20). Open C/Al editor (F9) and see the code of the OnValidate-trigger of Posting Date field:
Posting Date - OnValidate()
TestNoSeriesDate(
"Posting No.","Posting No. Series",
FIELDCAPTION("Posting No."),FIELDCAPTION("Posting No. Series"));
TestNoSeriesDate(
"Prepayment No.","Prepayment No. Series",
FIELDCAPTION("Prepayment No."),FIELDCAPTION("Prepayment No. Series"));
TestNoSeriesDate(
"Prepmt. Cr. Memo No.","Prepmt. Cr. Memo No. Series",
FIELDCAPTION("Prepmt. Cr. Memo No."),FIELDCAPTION("Prepmt. Cr. Memo No. Series"));
VALIDATE("Document Date","Posting Date");
IF ("Document Type" IN ["Document Type"::Invoice,"Document Type"::"Credit Memo"]) AND
NOT ("Posting Date" = xRec."Posting Date")
THEN
PriceMessageIfSalesLinesExist(FIELDCAPTION("Posting Date"));
IF "Currency Code" <> '' THEN BEGIN
UpdateCurrencyFactor;
IF "Currency Factor" <> xRec."Currency Factor" THEN
ConfirmUpdateCurrencyFactor;
END;
Comments
PS: be sure that doing it in a similar way for the Shipment Date that calling the OnValidate-trigger of Shipment Date makes sense.
Never stop learning
Van Vugt's dynamiXs
Dutch Dynamics Community
i am not able to find any code under onValidate trigger of Posting Date.
Can u guide me plz
Never stop learning
Van Vugt's dynamiXs
Dutch Dynamics Community
i got it.