Delete thousands of General Journal Lines

Hi everybody, did you ever tried to delete a General Journal Line Batch with about 20k lines? It takes more than 10-15 minutes in Saas, because for each line the system checks if there is a workflow activated for that line/account. In Navision I fixed bypassing the standard code of course, in BC saas I cannot do the same way, so maybe someone could give me an hint to avoid this check and make the deletion very fast as it should be. Thanks in advance for any help.

Have you tried importing empty data through a configuration package while enabling the “Delete Table Data Before Import” flag? This approach clears out existing records from the table, before processing the import—essentially resetting the table without manual deletion.

Be careful with this approach. The General Journal Lines is the table. The Delete all Table Data will clear ALL Batches, not just the one you are trying to clear. Be sure there are no lines in the other Batches (or better yet, export the Config Pack with those other Batches so you can reimport those lines you want to keep).

Best Regards,
Ben Baxter
Accent Software Inc

We have too many batches. I cannot use this workaround.

Federico

You can extract all the data in excel and keep for those batches for whom you don’t want to delete and then go ahead with the same process.

Of course but I cannot say the user to do this process just for deleting lines in a batch.
Moreover not all users should use rapid start packages in our team. It’s better they don’t use it at all to avoid problems.

Federico Bacile

Okay, understood. I wouldn’t recommend making this a recurring process for all users—I assumed this was a one-time requirement.
If it’s actually going to be a recurring task, then it’s better to stick with the standard process.
However, if you’re looking to replicate the behavior you had in NAV, you could consider adding a custom button to allow deletions, bypassing the standard triggers—but only after fully understanding the implications.

I already added a custom delete button but it runs anyway for the standard subscribers.
I think I will put a new button to make a task and delete them after working hours.

Federico Bacile