In the OnAfterOnDatabaseDelete method the user also need read and execute permissions on the "ADLSE Table Last Timestamp" record, see the error message (in Dutch) above.
[EventSubscriber(ObjectType::Codeunit, Codeunit::GlobalTriggerManagement, 'OnAfterOnDatabaseDelete', '', true, true)]
local procedure OnAfterOnDatabaseDelete(RecRef: RecordRef)
var
ADLSETableLastTimestamp: Record "ADLSE Table Last Timestamp";
ADLSEDeletedRecord: Record "ADLSE Deleted Record";
begin
// exit function for tables that you do not wish to sync deletes for
// you should also consider not registering for deletes for the table in the function GetDatabaseTableTriggerSetup above.
// if RecRef.Number = Database::"G/L Entry" then
// exit;
// check if table is to be tracked.
if not ADLSETableLastTimestamp.ExistsUpdatedLastTimestamp(RecRef.Number) then
exit;
ADLSEDeletedRecord.TrackDeletedRecord(RecRef);
end;
In the
OnAfterOnDatabaseDelete
method the user also need read and execute permissions on the "ADLSE Table Last Timestamp" record, see the error message (in Dutch) above.