A few days ago I needed to create a new country layout for the project invoice in Dynamics. Here is a small guide how to create this setup. I will not describe how to modify the report/invoice. I will only describe how to setup the new report/invoice .
Step 1 – create the dispatcher class
Start by creating a new class named ProjInvoiceDispatcher_DK (or whatever country code you are creating the new layout for). This class must extend the class ProjInvoiceDispatcher_W.
final class ProjInvoiceDispatcher_DK extends ProjInvoiceDispatcher_W
Create a new method getMenuItemName as below
protected MenuItemName getMenuItemName()
Step 2 – create the country specific report/invoice
Now create a copy of the existing project invoice reports. I used the report ProjInvoice_CZ and I renamed it to ProjInvoice_DK.
Step 3 – create an output menu item
Create an output menu item that points to the report created in step 2.
Step 4 – Modify the Base Enum ReportFormat_W
Add a new node named “Danish format”.
Step 5 – Setup Dynamics to use the new format
In the company that should use the new format go to Project/Setup/Forms/Form setup and select the invoice tab.
Select the new layout in the field “Country specific form”.
Step 6 – link the new dispatcher class
In order to activate the new setup a modification of the calss ProjInvoiceDispatch_W.construct() method must be made. Add the below code to the switch statement:
case ReportFormat_W::DanishFormat_DK :
dispatcher = new ProjInvoiceDispatcher_DK();
That’s it. Now all you need is to modify the ProjInvoice_DK report so that it meets your layout requirements. Enjoy J