Modifying a Dynamics 365 Business Central invoice format
Essentially, I need to add a custom field to the "Sales Invoice" report. This is report 1306 in D365BC. BTW, my production and sandbox are still the old "Dynamics 365 for Finance and Operations, Business Edition" version.
I've successfully added the field (i.e. "NigerianVAT") as a table extension to the "Sales Header" table in my sandbox. I did this through a VS Code project, using the AL language extension.
I tried to use the "Designer" to add the field to the "Quotes", "Sales Order" and "Sales Invoice" pages, but this blue-screened in each case. I'm not too worried about that. After all, it is a sandbox--and I can always extend the page via AL.
The real problem, is adding the field to the invoice report format so that the data will print on a sales invoice.
I think I’ve isolated the problem. I can’t modify the XML part on a .docx, but I can modify the dataset in an .rdl. This is easy to do.
I:
- Used an AL project to extend the Sales Header table to include my new field (i.e. “NigerianVAT”)
- Downloaded a custom copy of the 1306 (i.e. Sales Invoice) report as an .rdl.
- Modified the dataset to include my new field
- Added the new field in the totals section of the report format
- Uploaded the .rdl back into D365BC.
I then downloaded the .rdl again, to take a look at it. The report format still showed the field I had just added, but the dataset no longer contained the field. I did this several times just to confirm this. In my experiments, I also tried that before (and after) clicking on the “Update Layout” action in the "Custom Report Layout" screen.
It looks to me like D365BC is validating the .rdl each time I upload it, and deleting any fields from the report’s dataset that it doesn’t find in the underlying D365BC tables. The validation process isn’t taking my table extension into consideration.
I've attached a zip file with the report to this submission.
Thanks, --Dave--
To help us reproduce the issue and find the root please try to: A) Attach a minimal set of AL code that causes the issue B) If the error occurs on the server - copy/paste the server stack trace from the Event Viewer 1306 Sales Invoice Experiment.zip
Extending a report data set is currently not possible. The only way to achieve it would be to create a copy of the report and include the new field in the new dataset definition. Report extensibility is high on our priority list. #1452
Stanislaw, does this mean the necessary programming changes have been made within Business Central, or you are simply consolidating issues?
Thanks, --Dave--
Consolidating issues since this is already tracked by 1452
Stan,
Issue #2208 has been open for 21 days. Yesterday, I encountered the same error as Kine had encountered. I added a comment to the issue, that documents my experience.
Since I am using the April docker, I really do not see why I would be having a problem with an old .dll.
Please review the issue and let me know your thoughts…
Thanks,
--Dave--
David Boehm, CPA PBSI www.pbsisoftware.comhttp://www.pbsisoftware.com/ to book an appt.: https://outlook.office365.com/owa/calendar/[email protected]/bookings/ Office: 817.752.3352 tel:817.752.3352 Cell: 214.392.4797tel:214.392.4797
This communication, along with any documents, files or attachments, is intended only for the use of the addressee and may contain legally privileged and confidential information. If you are not the intended recipient, you are hereby notified that any dissemination, distribution or copying of any information contained in or attached to this communication is strictly prohibited. If you have received this message in error, please notify the sender immediately and destroy the original communication and its attachments without reading, printing or saving in any manner. Thank you.
From: Stanislaw Stempin [email protected] Sent: Wednesday, May 16, 2018 2:40 AM To: Microsoft/AL [email protected] Cc: Dave Boehm [email protected]; Author [email protected] Subject: Re: [Microsoft/AL] Modifying a Dynamics 365 Business Central invoice format (#2008)
Consolidating issues since this is already tracked by 1452
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/Microsoft/AL/issues/2008#issuecomment-389425119, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AYzmJ5nZpGtRjuJ6Hq9AgdaM7EwkznFeks5ty9e2gaJpZM4TSNhV.