I have created a new action on Page 143 Posted Sales Invoices to save the selected Posted sales invoice as a PDF document. You can select multiple records and save all of them at once in a specific path. To select many records at once and perform some action on all, you can refer my blog using the below link:

I have entered the required report ID in a newly created custom setup table. From that table, I am fetching the Report ID. The standard sales invoice report ID is 206. If you have a customized report you need to enter the respective customized report ID.

To download and save this particular Posted sales Invoice report, the following needs to be written:

Save the folder path in a variable FolderPath. You can enter the Folder path in a newly created custom table and fetch it from there.

You can create customized folders using C/AL code according to the posting date of the Posted Sales Invoice as mentioned in my previous blog using the link below and save the customized folder name in a FolderName variable.

Procedure to create custom folders in a specific location using C/AL code in Dynamics NAV

This will save the required Posted Sales Invoice record report in the mentioned location.