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

Notifications

Announcements

No record found.

Community site session details

Community site session details

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

My notes count is getting increased whenever I visit my new enquiry sales order page

(0) ShareShare
ReportReport
Posted on by 200

1070.notes-goes-on-incrawing.png

Here I create a enquiry card which is when I create a new sales order it gets added in my enquiry list,

But when I add note in sales order and I revisit enquiry page its count is increasing, why it's happening.

Need it's solution please very urgent.

//Procedure code part where I added copylinks function 

                  recEnquiries.Description := rec_SalesHeader."External Document No.";

                    // recEnquiries."Internal Notes" := rec_SalesHeader.customDeliveryNotes;

                    recEnquiries.isArchive := false;

                    recEnquiries.DateCreated := DT2DATE(rec_SalesHeader.SystemCreatedAt);

                    recEnquiries."Sell-to Customer No." := rec_SalesHeader."Sell-to Customer No.";

                    recEnquiries."Location Code" := rec_SalesHeader."Location Code";

                    recEnquiries.Status := rec_SalesHeader.Status;

                    if rec_SalesHeader.HasLinks then // here I added

                        recEnquiries.CopyLinks(rec_SalesHeader);

                    recEnquiries.Insert(true);

                    InsertSalesLine(recEnquiries.No);

                end;

            until rec_SalesHeader.Next() = 0;

        end;

// Called this procedure in open page trigger

trigger openpage

Var

cd_enq : codeunit enquiry

Begin

cd_enq.insertsalesorder

End;

As I used openpage that's why my notes count is increasing on each visit? Please any solution.

I have the same question (0)
  • Suggested answer
    Nitin Verma Profile Picture
    21,698 Moderator on at

    Hi, You can check if recEnquiries has already links so dont copy the link

     if rec_SalesHeader.HasLinks then

                 if not recEnquiries.haslinks then

                           recEnquiries.CopyLinks(rec_SalesHeader);

  • Dividutt Profile Picture
    200 on at

    It's working,same note is not coming but if I want add different notes or update that note that is  not coming now I need to add different notes, so how we also can optimise that?

  • Nitin Verma Profile Picture
    21,698 Moderator on at

    You can write another procedure to check and update the notes only on your enquire table.

  • Dividutt Profile Picture
    200 on at

    Write the same function in new procedure? And modify() ?

  • Nitin Verma Profile Picture
    21,698 Moderator on at

    Not same, only for update Links or notes.

    Thanks

  • Dividutt Profile Picture
    200 on at

    Hi, Nithin Verma Can you please show some example with my code, how u meant?

    Not getting the required output after creating new procedure?

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,329

#2
Jainam M. Kothari Profile Picture

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

#3
YUN ZHU Profile Picture

YUN ZHU 1,365 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans