Create budget plan templates manually
This content is archived and is not being updated. For the latest documentation, see Microsoft Dynamics 365 product documentation. For the latest release plans, see Dynamics 365 and Microsoft Power Platform release plans.
Applies To: Microsoft Dynamics AX 2012 R3, Microsoft Dynamics AX 2012 R2
You can create budget plan templates for Microsoft Excel and Microsoft Word. After you create budget plan templates, users can create Excel worksheets and Word justification documents that are linked to the budget plan tables in Microsoft Dynamics AX. For information about how to set up template folders and templates, see Key tasks: Configure budget planning and set up budget planning processes. For information about how to work with worksheets and justifications in budget plans, see Key tasks: Create and process budget plans.
This feature is available only if Microsoft Dynamics AX 2012 R2 and Office Add-ins for Microsoft Dynamics AX are installed.
Starting with cumulative update 7 for Microsoft Dynamics AX 2012 R2, you can create Excel templates for budget plan worksheets by using a wizard in Microsoft Dynamics AX. For more information, see Create budget plan worksheet templates by using a wizard.
Set up data sources for budget plan templates
Before you can create budget plan templates for the first time, you must set up the data sources for the templates.
Click Organization administration > Setup > Document management > Document data sources.
To select a data source for Excel templates, click New, and then follow these steps:
In the Module field, select Budget.
In the Data source type field, select Service.
In the Data source name field, select the name of the service.
To select a data source for Word templates, click New, and then follow these steps:
In the Module field, select Budget.
In the Data source type field, select Query reference.
In the Data source name field, select the name of the query.
About creating worksheet templates
When you open Excel, the pages in the worksheet template are identified as numbered sheets, such as Sheet1 and Sheet2. Each sheet or page in the worksheet template has a different purpose. The following table describes the sheets in a typical worksheet template.
Sheet1 (entry page)
The page that the user sees and works with. This page should have the focus when you close the template file.
Sheet2 (backing page)
A required page that must contain all the required fields, key fields, optional fields, and any fields that are used in the matrix fields but that are not already included. This page can be hidden.
Sheet3 (Dynamics AX Status page)
The page that displays the publishing status and details when information is published back to the budget plan from the worksheet. The details on this page include any errors that occurred.
When you create a worksheet from the template, an additional hidden page named BudgetPlanText is added to the worksheet to support the budget plan header fields. You can right-click a sheet tab to display the BudgetPlanText page.
When you create worksheet templates, consider the following best practices:
Focus on the purpose of the template. Make sure that the template shows only the information that users need. For example, one template might show summarized details in one stage for a high-level manager, and another template might show more details in another stage for a budget manager.
Use a base template. Build a basic template on a test computer, and make sure that this base template works correctly before you create working versions of it.
Use conditional formatting to emphasize the characteristics of the data. For example, you can emphasize important fields by using another color.
Manage matrix fields. Many calculations are processed in the background for matrix fields, and these calculations can slow performance. Create all the matrix fields in the base template. Then, in each version of the base template, remove the matrix fields that are not required.
A matrix field contains the values that you use to put related records into groups. For more information, see Using the Office Add-ins API.
Microsoft Visual Studio Tools for Office is used to enter, manage, and display the data for Office Add-ins. Use formulas and macros to best use Visual Studio Tools for Office.
Create a worksheet template
In Excel, on the Dynamics AX tab, click Add data.
In the Add data form, select the data source. Multiple budget plan data sources are displayed. Hold the pointer over a data source to display the name of that data source.
On the Dynamics AX tab, click Fields to open Field chooser.
On the entry page, or Sheet1, select a cell. Then, in Field chooser, double-click a field to add that field to the entry page, next to the cell that you selected.
You can add one or more matrix fields to show totals for groups of related records on the budget plan lines. To add a matrix field, follow these steps:
On the entry page, select a cell to provide a location for the matrix field.
In Field chooser, right-click Budget plan lines, and then select Create Matrix Field.
Enter a name for the matrix field.
Select or enter the Where conditions for the filter. When you enter the Where condition, use Budget plan lines.Budget plan scenario, not Budget plan lines.Budget plan scenario (scenarioName).
To add header fields, follow these steps:
On the entry page, select a cell to provide a location for the header field.
In Field chooser, double-click the field for the header. For example, to select the Document number header field, double-click Document number under Budget plans.
In Field chooser, you can hold the pointer over a field to determine whether it is a header field. For example, when you hold the pointer over the Document number field, BudgetPlanHeader.DocumentNumber is displayed.
In the cell under the header field in the template, enter the text that was displayed in the previous step. For example, if you selected the Document number field, enter BudgetPlanHeader.DocumentNumber.
You can change the caption for the field. For example, you can change Document number to Budget plan number.
Click a worksheet cell to create at least one named cell, which provides support for the header fields in the template. In the Name box, enter a name for the cell.
Click the backing page, or Sheet2. Add all the key fields, required fields, and any additional fields that were used on the entry page and in the matrix fields. In Field chooser, a red asterisk (*) is displayed next to the required fields and key fields. Make sure that the following required fields and key fields are included on the backing page:
Parent budget plan.Document number
Scenario.Budget plan scenario
Ledger dimensions that are selected on the entry page
Close Field chooser.
On the Dynamics AX tab, click Options, and then select the legal entity and the default account structure.
On the Dynamics AX tab, click Refresh to load and test the data.
Click the entry page before you save and close the file. This step guarantees that the entry page is displayed when a user first opens a worksheet from the template.
Save the .xlsx file to the folder for budget plan templates. When you configure budget planning, select the template file name and the template folder in the Templates area of the Budget planning configuration form.
Create a justification template
In Word, on the Dynamics AX tab, click Add data.
In the Add data form, select the query reference. Hold the pointer over a data source to display the name of that data source.
On the Dynamics AX tab, click Fields.
Drag fields from Field chooser to the template. Include all required fields.
Close Field chooser.
On the Dynamics AX tab, click Options, and then select the legal entity.
On the Dynamics AX tab, click Merge to load and test the data.
Save the .docx file to the folder for budget plan templates. When you configure budget planning, select the template file name and the template folder in the Templates area of the Budget planning configuration form.