I have created a report to import items, item variant, sales prices, and purchase prices from XML file( using dl assembly) and in the end show statistical data like no. of new items created, no. of items updated, no. of items unmodified etc. into business central.
I want to implement preview feature in BC 15.
This feature goes through the same report and create items, item variant, sales prices, and purchase prices. But at the end everything has to rollback except statistic data.
Is there any way to rollback without creating error and at the end show the statistical data?
After lot of research I found that you can user Asserterror() todo the rollback but in BC, microsoft doesn’t not allowed to use in production code.
are there any alternative solution in BC?
Thanks in advance.