web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

How to delete one Entry from Table

(0) ShareShare
ReportReport
Posted on by

I am currently writing a workflow module. In the first response, I save data to a table called notifyEntry. In another response, I would like the record to be deleted.

 local procedure CreateNotifyEntry(var VariantVariant; WorkflowStepInstance: Record "Workflow Step Instance")
    var
        RecRef: RecordRef;
        NotifyEntry: Record "Notify Entry";
    begin
        RecRef.GetTable(Variant);
        PopulateNotifyEntryArgument(RecRef, WorkflowStepInstance, NotifyEntry);

        NotifyEntry.Insert(true);
    end;

    local procedure PopulateNotifyEntryArgument(RecRef: RecordRef; WorkflowStepInstance: Record "Workflow Step Instance"; var NotifyEntry: Record "Notify Entry")
    var
        Header: Record "Management Header";
        Handled: Boolean;
    begin
        NotifyEntry.Init();
        NotifyEntry."Table ID" := RecRef.Number;
        NotifyEntry."Source Record ID" := RecRef.RecordId;
        NotifyEntry."Workflow Step Instance ID" := WorkflowStepInstance.ID;

        case RecRef.Number of
            Database::"Header Management":
                begin
                    NotifyEntry."Contact No." := Header.NotifyContactNo;
                    NotifyEntry."Expiration Date/Time" := CreateDateTime(Header."Task Date", 0T);
                end;
            else begin
                    Handled := false;
                    OnPopulateNotifyEntryArgument(Handled, RecRef, NotifyEntry);
                    if not Handled then
                        error(NotSupportedSourceForNotifyEntryErr, RecRef.Caption);
                end;

        end;

    end;
As can be seen in the source code, I save data from Management Header in NotifyEntry in the first response. The source record ID is also saved in the table. However, I am not sure how I can delete exactly this entry in the Delete Response. Can someone help me to solve this problem?
I have the same question (0)
  • Suggested answer
    JAngle Profile Picture
    159 on at

    Worth considering that none of the standard workflows delete a notification entry. It acts as a method of verifying whether it was created at all. Admins then clear this table down periodically.

    It's not really a data tidy up kind of routine in my view.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 572 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 331 Super User 2026 Season 2

#3
Grigorios Mavrogeorgis Profile Picture

Grigorios Mavrogeorgis 330 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans