microsoft / ALAppExtensions

Repository for collaboration on Microsoft AL application add-on and localization extensions for Microsoft Dynamics 365 Business Central.
MIT License
791 stars 622 forks source link

[Event Request] Table 5900 "Service Header" : OnBeforeValidateStartingDate, OnBeforeValidateStartingTime, OnBeforeValidateFinishingDate, OnBeforeValidateFinishingTime #27642

Open jchaloupka-pdw opened 4 days ago

jchaloupka-pdw commented 4 days ago

Describe the request

Can you please create the following 4 integration events: OnBeforeValidateStartingDate, OnBeforeValidateStartingTime, OnBeforeValidateFinishingDate and OnBeforeValidateFinishingTime in table 5900 Service Header and add them into OnValidate() trigger of the related table fields - Starting Date, Starting Time, Ending Date and Ending Time?

[IntegrationEvent(false, false)] local procedure OnBeforeValidateStartingDate(var ServiceHeader: Record "Service Header"; xServiceHeader: Record "Service Header"; CallingFieldNo: Integer; var IsHandled: Boolean) begin end;

[IntegrationEvent(false, false)] local procedure OnBeforeValidateStartingTime(var ServiceHeader: Record "Service Header"; xServiceHeader: Record "Service Header"; CallingFieldNo: Integer; var IsHandled: Boolean) begin end;

[IntegrationEvent(false, false)] local procedure OnBeforeValidateFinishingDate(var ServiceHeader: Record "Service Header"; xServiceHeader: Record "Service Header"; CallingFieldNo: Integer; var IsHandled: Boolean) begin end;

[IntegrationEvent(false, false)] local procedure OnBeforeValidateFinishingTime(var ServiceHeader: Record "Service Header"; xServiceHeader: Record "Service Header"; CallingFieldNo: Integer; var IsHandled: Boolean) begin end;

field(5929; "Starting Date"; Date)
{
  Caption = 'Starting Date';

  trigger OnValidate()
  var
    IsHandled: Boolean;  
  begin
    IsHandled := false;
    OnBeforeValidateStartingDate(Rec, xRec, CurrFieldNo, IsHandled);
    if IsHandled then
      exit;
  ...
  end;
}

Additional context

We need to maintain our own logic for the mentioned 4 fields and therefore we need these integration events. Internal work item: AB#558157