-
Notifications
You must be signed in to change notification settings - Fork 686
Description
Why do you need this change?
We need to execute custom logic on the "Calendar Absence Entry" record immediately before it is inserted by the "Implement Registered Absence" report (99003801)
Describe the request
We request the addition of a new integration event in the OnAfterGetRecord trigger of the "Registered Absence" dataitem within report 99003801 "Implement Registered Absence".
New IntegrationEvent:
[IntegrationEvent(false, false)]
local procedure OnBeforeInsertCalendarAbsEntry(var CalendarAbsEntry: Record "Calendar Absence Entry"; RegisteredAbsence: Record "Registered Absence")
begin
end;
Original Code:
trigger OnAfterGetRecord()
begin
CalendarAbsEntry.Init();
CalendarAbsEntry.Validate("Capacity Type", "Capacity Type");
CalendarAbsEntry.Validate("No.", "No.");
CalendarAbsEntry.Validate(Date, Date);
CalendarAbsEntry.Validate("Starting Time", "Starting Time");
CalendarAbsEntry.Validate("Ending Time", "Ending Time");
CalendarAbsEntry.Validate(Capacity, Capacity);
CalendarAbsEntry.Validate(Description, Description);
if not CalendarAbsEntry.Insert() then
if Overwrite then
CalendarAbsEntry.Modify();
end;
Requested Change:
Original Code:
trigger OnAfterGetRecord()
begin
CalendarAbsEntry.Init();
CalendarAbsEntry.Validate("Capacity Type", "Capacity Type");
CalendarAbsEntry.Validate("No.", "No.");
CalendarAbsEntry.Validate(Date, Date);
CalendarAbsEntry.Validate("Starting Time", "Starting Time");
CalendarAbsEntry.Validate("Ending Time", "Ending Time");
CalendarAbsEntry.Validate(Capacity, Capacity);
CalendarAbsEntry.Validate(Description, Description);
OnBeforeInsertCalendarAbsEntry(CalendarAbsEntry, "Registered Absence");
if not CalendarAbsEntry.Insert() then
if Overwrite then
CalendarAbsEntry.Modify();
end;
Internal work item: AB#612248