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?
Thankyou will look into this.
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;
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:
And, Performance Articles For Developers
https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/performance/performance-developer
Hope this helps.
Thanks.
ZHU
Hi Nitin Verma, Here is my codeunit ss where I code for copy all sales order to enquiry list page.
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.
Please share your code.
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?
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/
Hope this helps.
Thanks.
ZHU
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
Press Yes If info is useful
Share your code with trigger where you have written. and I think it will take this much time because you have written on OnOpenpage.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,113 Super User 2024 Season 2
Martin Dráb 229,918 Most Valuable Professional
nmaenpaa 101,156