Announcements
Hello,
I need to be able to control the Bank Account showing in the invoice template based on the reason code, but I'm having two issues:
1. When I go to the template in word - developer tab - click XML mapping -> select the Sales Invoice 1306 in the XML custom part -> the reason code is not there to be added into the template
2. How could I add an IF formula there? I would need something like if("reasoncode"=AAR, "123", "345")
Thanks
Alejandra
Hi, Vaishnavi's suggestion is absolutely correct. Just adding a few more.
1: You need to use ReportExtension Object to add new field to standard report. (APPLIES TO: Business Central 2021 release wave 1 (v18.0) and later)
2: Word Layout doesn't support If formula, so you have to handle it in ReportExtension Object and then display the result on Word Layout.
Hope this helps as well.
Thanks.
ZHU
Hi AleAlonso
1. In Report 1306 there is no field Reason Code so you need to add field by creating Report Extension of Report 1306.
2. In Word Layout report you cannot add IIF conditions but in rdl you can do that easily.
If my answer was helpful to you, please verify it so that other users know it worked. Thank you very much
André Arnaud de Cal...
294,099
Super User 2025 Season 1
Martin Dráb
232,866
Most Valuable Professional
nmaenpaa
101,158
Moderator