30. Januar 2023 19:57
31. Januar 2023 09:11
LOCAL PROCEDURE DeleteNotif@1000000104();
VAR
NotificationEntry@1000000000 : Record 1511;
BEGIN
NotificationEntry.RESET();
DeleteOutdatedApprovalNotificationEntires(NotificationEntry);
END;
LOCAL PROCEDURE DeleteOutdatedApprovalNotificationEntires@1(VAR NotificationEntry@1000 : Record 1511);
BEGIN
IF NotificationEntry.FINDFIRST THEN
REPEAT
IF ApprovalNotificationEntryIsOutdated(NotificationEntry) THEN
NotificationEntry.DELETE;
UNTIL NotificationEntry.NEXT = 0;
END;
LOCAL PROCEDURE ApprovalNotificationEntryIsOutdated@9(VAR NotificationEntry@1000 : Record 1511) : Boolean;
VAR
ApprovalEntry@1003 : Record 454;
OverdueApprovalEntry@1002 : Record 458;
DataTypeManagement@1004 : Codeunit 701;
RecRef@1001 : RecordRef;
BEGIN
DataTypeManagement.GetRecordRef(NotificationEntry."Triggered By Record",RecRef);
CASE NotificationEntry.Type OF
NotificationEntry.Type::Approval:
BEGIN
RecRef.SETTABLE(ApprovalEntry);
IF NOT RecRef.GET(ApprovalEntry."Record ID to Approve") THEN
EXIT(TRUE);
END;
NotificationEntry.Type::Overdue:
BEGIN
RecRef.SETTABLE(OverdueApprovalEntry);
IF NOT RecRef.GET(OverdueApprovalEntry."Record ID to Approve") THEN
EXIT(TRUE);
END;
END;
END;
31. Januar 2023 10:55
27. Februar 2023 17:41