Skip to content

[IT][Report][99003801][Implement Registered Absence] OnBeforeInsertCalendarAbsEntry #29373

@g-ingardia

Description

@g-ingardia

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    FinanceGitHub request for Finance areaevent-requestRequest for adding an eventships-in-future-updateFix ships in a future update

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions