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

Community site session details

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

while revisiting my enquiry system page the notes i entered is getting deleted.

(0) ShareShare
ReportReport
Posted on by 200

Here I have a enquiry card which i made and , I am entering notes in notes section, 

enq1.png

After I revisit my notes after closing enquiry page tab, my notes get deleted automatically without manually deleting

enq-3.png

I share my code what can be done here why its getting deleted please help.

codeunit 50425 "Enquiries notes"
{
    procedure CopyLinksFromEnquiriesToSalesHeader(rec_SalesHeader: Record "Sales Header")
    var
        recordLink: Record "Record Link";
        recEnquiries: Record "Enquiries";
        rec_EnquiriesLine: Record "Enquiries Line";
    begin

        // Check if the Enquiries record has any links
        recEnquiries.SetRange(No, rec_SalesHeader."No.");
        if recEnquiries.FindSet() then begin

            if recEnquiries.HasLinks then begin
                // Delete any existing links for the Sales Header record
                rec_SalesHeader.DeleteLinks();

            end;
        end;
    end;

}
//I call codeunit it in openpage trigger
I have the same question (0)
  • Verified answer
    YUN ZHU Profile Picture
    94,541 Super User 2025 Season 2 on at
    RE: while revisiting my enquiry system page the notes i entered is getting deleted.

    Hi, it seems that your custom enquiry card background table is also a Sales header? The RecordID of the enquiry card background table is the same as that of rec_SalesHeader, so if rec_SalesHeader is cleared, it will also be deleted on the enquiry card.

    pastedimage1684196247221v2.png

    pastedimage1684196291471v3.png

    Hope this helps.

    Thanks.

    ZHU

  • Dividutt Profile Picture
    200 on at
    RE: while revisiting my enquiry system page the notes i entered is getting deleted.

    But if not use deletelinks() the notes get repeated in each time in open page so I needed to add delete link,

    So how can we maintain that?

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,106

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 2,291 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 2,010 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans