Walkthrough: Create and Use a Custom Operating Unit Type
Applies To: Microsoft Dynamics AX 2012 R3, Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012
The Microsoft Dynamics AX organization model includes a set of operating unit types. These types are elements on the OMOperatingUnitType enumeration. You can add custom operating unit types to the enumeration.
Every instance of an operating unit that is created must be categorized as one of these operating unit types. A custom operating unit can represent a unit in retail, professional services, the public sector, and so on.
In this topic you will create an operating unit named Branch.
Create a New Base Enumerated Value
You can create a new base enumerated value for your custom operating unit by following these steps:
Create a private or shared project named CustomOperatingUnit.
A project provides an overview of the application objects you are currently working on. For information about how to create a project, see How to: Create a MorphX Development Project.
Drag the AOT > Data Dictionary > Base Enums > OMOperatingUnitType node onto the project node.
Add an element named OMBranch to the OMOperatingUnitType enum.
You do this by right-clicking the enum, and then clicking New Element.
In the Properties window for the new element, set the property values as shown in the following table.
Add the new operating unit type to the switch case in \Classes\NumberSeqScope\getFormatSegmentShortName and create a new shortNameValue that is unique
Create a View
In this section you create a view named DimAttributeOMBranchView. The view resembles the views that are created for other types of operating units. For example, the DimAttributeOMBusinessUnit view was created for business units.
Locate DimAttributeOMBusinessUnit under the AOT > Data Dictionary > Views node.
Duplicate DimAttributeOMBusinessUnit by right-clicking the DimAttributeOMBusinessUnit node, and then clicking Duplicate. The AOT will create the CopyOfDimAttributeOMBusinessUnit node.
Drag the CopyOfDimAttributeOMBusinessUnit node onto the project node.
In the Properties window for the newly created enum element, set the properties as shown in the following table.
The OMBranchView contains all records from the OMOperatingUnit table that are marked as branches.
Locate the OMOperatingUnitTypeOMBusinessUnit range under the new DimAttributeOMBranchView view. The range is under the Metadata > Data Sources > BackingEntity(OMOperatingUnit) > Ranges node.
In the Properties window for the OMOperatingUnitTypeOMBusinessUnit range, set the properties as shown in the following table.
Create a Menu Item for the Branch Unit Type
Create the menu item OMBranchMenuItem in the CustomOperatingUnit project. To do this, right-click the project node, and then click New > Menu Item > Display.
In the Properties window for OMBranchMenuItem, set the following properties.
Review the Project
At this point you have created all the items that are shown in the following image.
The project that you create
Use Your New Operating Unit Type
In this section you use the new OMBranch operating unit type that you created. You create a new instance of an operating unit, and it is associated to the OMBranch type. Perform the following steps:
Right-click the OMBranchMenuItem, and then click Open.
Click New on the toolbar, and then enter the branch name as My Branch.
The Branch form contains the new unit instance that you created, as shown in the following image.
The new operating unit that you create
An operating unit is an organization that divides the control of economic resources and operational processes among people who have a duty to maximize the use of scarce resources, to improve processes, and to account for their performance. After you complete this walkthrough you have a new operating unit type. Now you can create a new operating unit. For information about how to create an operating unit, see Create or modify an operating unit.
You can incorporate the instances of new types of operating units in the organization hierarchy. You can also use operating units in end-to-end transaction scenarios to:
Define and apply data security policies for transactions.
Define business rules and policies to be applied for transactions.
Perform aggregated rollup reporting.
Announcements: New book: "Inside Microsoft Dynamics AX 2012 R3" now available. Get your copy at the MS Press Store.