“The Report Layout does not exist. ‘MS-1322-EMAIL_DEF'”
The Error
You can’t send Purchase Orders after updating Microsoft Dynamics 365 Business Central to Version: US Business Central 23.0 (Platform 23.0.13763.0 + Application 23.0.12034.12676). The error “The Report Layout does not exist. Identification fields and values: Code=’MS-1322-EMAIL_DEF'” indicating a missing email body layout is presented rather than the emailing page expected.
In addition to when sending Purchase Orders, an error was also received when sending a Sales Quote.
The Cause
Based on the error, it appears the built-in email body layouts for Sales Quote and Purchase Order are both missing after the update. Checking in Report Selection – Purchases, the email body selected is the “US Purchase Order – Default Email Body”. The Email Body Custom Layout Code is the same layout indicated in our error. All seems fine here, but it’s not.
The “Fix” that didn’t work
I checked a few of my troubleshooting go-to resources for help. I found reference to BC moving from Custom Report Layouts to Report Layouts for printing. And it appears others are encountering the same type of errors after updating.
I tried to use the new “Email Body Layout Name” field on Report Selections as this post suggested, but we didn’t like the new layout provided in Report Layouts for the email body. We wanted to continue to use the old layout. So we decided to create our own Report Layout for the email body.
Since the layout we want to use no longer exists after the update, I was lucky to find a yet to be updated BC environment. I filtered Custom Report Layouts for email body layouts and exported a copy of each of the layouts in my filtered list. I want to have a copy of every one of them in the event there are more issues to yet to be found. Better safe than sorry.
I next created a new Report Layout for PO (1322) and used “Replace Layout” to import the Word email body layout we exported from the legacy Custom Report Layouts. I exported from the Report Layout and opened it in Word to confirm the email body template is as expected in the Report Layout.
From the Report Selections, I removed the layout selected in the field captioned “Email Body Custom Layout Code”, confirmed “Use for Email Body” is checked, then selected the new report in field “Email Body Layout Name”.
However, when I preview the email prior to sending, the body is not what has been assigned in Email Body Layout Name. It appears to be the layout assigned for the attachment.
I have reported this in the Dynamics 365 Business Central Partner Community where I did found the post leading me down this path initially.
So back to square one! We still need to send out documents with the email body we expect.
The temporary fix
So, back to getting the soon-to-be legacy custom report layout email body to work, if I can. Since we can’t change the layouts of built-in reports, and the built-in reports are missing their layouts, I created new Custom Report Layouts prefixing the name of each with Copy then adding 23.0 at the end (referencing the BC version).
To each of these new Custom Layout Report copies, I imported the corresponding layout saved from the yet to be updated “legacy” environment. These are the same layouts I imported to Report Layouts earlier.
In Report Selection – Purchase and Report Selection – Sales, I cleared the “Email Body Report Layout” and selected the newly created layouts for “Email Body Custom Layout Code”.
After these changes, we are able to successfully email documents without error and with the desired email body format.
The Righter Way – for now!
So at least for now, this is The Righter WayTM to use the default legacy email body format when sending documents after updating to Version: US Business Central 23.0 (Platform 23.0.13763.0 + Application 23.0.12034.12676).
I will keep you updated whenever I learn more! I don’t know how long this temporary fix will work since the Custom Report Layouts are going away. Please let me know in the comments here or in LinkedIn if you found this to be helpful.
To be notified immediately when blogs are posted, subscribe at here at Sharing The Righter Way Cynthiapriebe.com.