You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would it be possible to include an event in each of the following functions?
Thank you.
procedure CalculateMaxDueDate(BaseDate: Date): Date
//
var
CalculatedDate: Date;
IsHandled: Boolean;
//
begin
//
OnBeforeCalculateMaxDueDate(Rec,BaseDate,CalculatedDate,IsHandle);
if IsHandle then
exit(CalculatedDate);
//
if "Max. No. of Days till Due Date" = 0 then
exit(99991231D);
exit(CalcDate(StrSubstNo('<%1D>', "Max. No. of Days till Due Date"), BaseDate));
end;
procedure VerifyMaxNoDaysTillDueDate(DueDate: Date; DocumentDate: Date; MessageFieldCaption: Text[50])
//
var
IsHandled: Boolean;
//
begin
//
OnBeforeVerifyMaxNoDaysTillDueDate(Rec,DueDate,DocumentDate,MessageFieldCaption,IsHandle);
if IsHandle then
exit;
//
if (DueDate <> 0D) and ("Max. No. of Days till Due Date" > 0) then
if DueDate - DocumentDate > "Max. No. of Days till Due Date" then
Error(Text10700, MessageFieldCaption, FieldCaption("Max. No. of Days till Due Date"), TableCaption);
end;
//
IntegrationEvent(false, false)]
local procedure OnBeforeCalculateMaxDueDate(PaymentTerms: Record "Payment Terms";BaseDate:Date;var CalculatedDate:Date; var IsHandle:boolean)
begin
end;
[IntegrationEvent(false, false)]
local procedure OnBeforeVerifyMaxNoDaysTillDueDate(PaymentTerms: Record "Payment Terms";DueDate:Date; DocumentDate:Date; MessageFieldCaption: Text[50]; var IsHandle:boolean)
begin
end;
//
Additional context
My client needs to be able to calculate these two functions in a fully customised way. And since they are called from many points of the application I consider that my best option is these two events.
Internal work item: AB#561473
The text was updated successfully, but these errors were encountered:
Describe the request
Hello,
Would it be possible to include an event in each of the following functions?
Thank you.
Additional context
My client needs to be able to calculate these two functions in a fully customised way. And since they are called from many points of the application I consider that my best option is these two events.
Internal work item: AB#561473
The text was updated successfully, but these errors were encountered: