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

Notifications

Announcements

Community site session details

Community site session details

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

My system page is getting time to load.

(0) ShareShare
ReportReport
Posted on by 200

Here I have a page where I get all the sales order sales order archive copied with copy management function(from sales order).

Due this my page is getting to much time to load, because on each time I do trigger OnOpenpage  the order gets displayed in my system page, may be due this it's taking time. How can we avoid this taking time, what is the solution please help very urgent.

Is there any function, or method I can use in al code to avoid this issue?

Screenshot_5F00_20230518_2D00_140143_5F005F00_01.jpg

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

    Share your code with trigger where you have written. and I think it will take this much time because you have written on OnOpenpage.

  • Amit Profile Picture
    2,559 on at

    Hi,

    First check, If you add flowfields in the list. this is also one reason to load the list page

    Regards

    Amit Sharma

    www.erpconsultors.com

    www.linkedin.com/.../

    Press Yes If info is useful

  • Verified answer
    YUN ZHU Profile Picture
    96,256 Super User 2025 Season 2 on at

    Hi, If you are using the latest version of BC, you can use the In-client performance profiler function to see which extension, trigger or function is causing this problem.
    More details: https://yzhums.com/23121/

    pastedimage1684453785346v1.png

    pastedimage1684453802299v2.png

    Hope this helps.

    Thanks.

    ZHU

  • Dividutt Profile Picture
    200 on at

    Yes Nithin Verma due to openpage , but I want to show my orders in openpage only, partially ship or fully shipped all are updated on my page when I open it

    I tried using date function to show that months orders, so my question is there any way we can optimise code where my page can take less time?

  • Suggested answer
    Nitin Verma Profile Picture
    21,710 Moderator on at

    Please share your code.

  • Dividutt Profile Picture
    200 on at

    Hi Nitin Verma, Here is my codeunit ss where I code for copy all sales order to enquiry list page.

    3733.ss1.png 0363.ss2.png2620.ss3.pngss4.png

    and i call it on open page so I can see my copied sales order in enquiry, but there are more records its takes time so is there way, I can do so that it take less time.

    ss5.png_2D00_640x480.png

  • Suggested answer
    YUN ZHU Profile Picture
    96,256 Super User 2025 Season 2 on at

    Hi, I suggest you move this code into an action and let the user run it manually.
    Or get data from Sales Order when opening your custom Enquires page, so at least it won't affect the standard functionality.

    Also, you can give Page Background Tasks a try.
    More details:

    https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-page-background-tasks

    https://businesscentralgeek.com/how-to-run-background-processes-in-business-central-page-background-tasks

    And, Performance Articles For Developers
    https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/performance/performance-developer

    Hope this helps.

    Thanks.

    ZHU

  • Suggested answer
    Nitin Verma Profile Picture
    21,710 Moderator on at

    HI,

    I just saw your codeunit, and found that you have scope to optimize your code while inserting data in the enquiry table, you need to change your Primary Key of enquiry table, with say "Order No." and write below line while inserting, no need of else condition. I would request you, share always Txt of code.

    if not Enquiry.get(SalesHeader."No.") then

    begin

      enquiry.init

       .....................

      enquiry.insert

    end;

  • Dividutt Profile Picture
    200 on at

    Thankyou will look into this.

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

News and Announcements

Season of Giving Solutions is Here!

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 1,638

#2
YUN ZHU Profile Picture

YUN ZHU 837 Super User 2025 Season 2

#3
Khushbu Rajvi. Profile Picture

Khushbu Rajvi. 704 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans