Presentation on Dimension Framework in AX 2012

advertisement
Dimension Framework in AX 6
By,
Nasheet Ahmed Siddiqui
Agenda
•
•
•
•
•
What are dimensions?
Dimension Terms
Configure Account Structure and Advanced rule.
Dimension Data Model
How an offset account (10110-D10-CC2) in the Lines Journal
saved in the dimension.
• Patterns Details and Implementation.
• Dimension APIs
What are dimensions?
• Dimension are sub account to the general ledger chart of
accounts.
• They allow an account to be broken-down into additional
detail for reporting and analysis.
Dimension Example
• Account 3000 has a balance of 100$. This balance can be
analyzed by dimension.
Dimension Example
•
Dimension Terms
Term
Definition
Chart of accounts
A collection of ledger accounts
account structure
A configuration of the main account financial dimension and other financial dimensions.
Example:
Account Structure for expense accounts
{Company, Main Acct, Cost Center, Campaign, Country}
account rule
financial dimension
financial dimension
value
A rule in an accounting system that controls the valid financial dimension value combinations
when the requirements of the financial dimension structure condition are met.
A piece, or slice, of information that a company chooses to capture.
OR
A data classifier created from the parties, locations, products, and activities in an organization
and used for management reporting.
A data element in the domain of a financial dimension.
For example, if ‘Project’ is setup as a Dimension, ‘Project A’ and ‘Project B’ would be considered
dimension values for that dimension.
Dimension Terms
Term
Definition
Dimension Focus
Grouping of dimension attributes listed in a specific order used in the creation of financial
statements and financial reports within Dynamics AX
ledger account
A classifier created from the combination of main account value and other financial dimension
values listed in a chart of accounts and used to classify the financial consequences of economic
activity.
ledger account alias
A shortcut that is used to retrieve a complete or partial ledger account.
main account
A classifier of economic resource value based on the claims parties make on the economic
resources owned by a legal entity and that is used to classify debit and credit entries in an
accounting system.
Dimension Specifiers
A dimension specifier represents a dimension attribute value, and is stored by means of a
container. A dimension specifier is not exposed by itself. Rather, a collection of dimension
specifies is exposed through a Map object
Demo
•
Steps to configure Account Structure and Advanced rule
This Document includes:
Account Structure Configuration
Account Structure Configuration effect on GL
Advanced Rule application on Account Structure
Advanced rule effect on GL
Data Model
•
How an offset account (10110-D10-CC2) in
the Lines Journal saved in the dimension.
• Segmented control works with the DimensionStorage class to
create the combination
• So; we break apart the combination into each structure
[10110 - D1] [CC2}. We first save the Account Structure
portion of the combination. Then we save the
Account/Advanced Rule structure portion (as there could be
multiples added thru multiple rules). In the end, this is what
that combination will look like across all 4 tables shown in the
combination storage block in the Data model bound to the
LedgerDimension.
How an offset account (10110-D10-CC2) in
the Lines Journal saved in the dimension.
• Configure an account structure that looks like this: Main
Account + Department
• (See the attached document for how to configure account
structure)
•
• Create an advanced rule attached to account structure to say
that when you enter 10110 - D1 you also need to specify a
Cost Center.
• (See the attached document for how to create advanced rule)
How an offset account (10110-D10-CC2) in
the Lines Journal saved in the dimension.
• An Segmented entry control will look like this
• As account structure configure there are 2 segments that must
be filled.
• Type 10110 and tab it looks like this: 10110 • Type D1 in the second segment and tab
• As tab press we pick up the fact that a rule is attached and a
3rd dimension must be added to the combination so it looks
like this: 10110 - D1 • Now the user enters CC2 and tabs from the control 10110 - D1
- CC2
How an offset account (10110-D10-CC2) in
the Lines Journal saved in the dimension.
• DimensionAttributeValueCombination:
• DisplayValue: "10110 - D1 – CC2"
RecId: 400
•
• DimensionAttributeValueGroupCombination:
• DimensionAttributeValueCombination: 400
DimensionAttributeValueGroup: 500
RecID: 201
• DimensionAttributeValueGroupCombination:
•
DimensionAttributeValueCombination: 400
DimensionAttributeValueGroup: 501
RecID: 202
•
•
• DimensionAttributeValueGroup:
• DimensionHierarchy: AccountStructure(MA+DEPT)
RecID: 500
•
• DimensionAttributeValueGroup:
• DimensionHierarchy: AdavancedRule (CC)
RecID: 501
How an offset account (10110-D10-CC2) in
the Lines Journal saved in the dimension.
• DimensionAttributeLevelValue:
DimensionAttributeValueGroup: 500
Ordinal: 1
DimensionAttributeValue->10110
RecId: 601
DimensionAttributeLevelValue:
DimensionAttributeValueGroup: 500
Ordinal: 2
DimensionAttributeValue->D1
RecId: 602
DimensionAttributeLevelValue:
DimensionAttributeValueGroup: 501
Ordinal: 1
DimensionAttributeValue->CC2
RecId: 602
•
• To insert: [10110 - D1] [CC2] we need to insert above all records as summarized below.
• 1 record in DAVC
2 Records in DAVGC (to link the full combination to each sub-group)
• 2 records in DAVG (one for each grouping)
• 3 records in DALV (one for each segment)
Patterns Details and
Implementation
Pattern
EDT
Field
Field is a Foreign Key to this Table
Default Account
LedgerDimensionDefaultAccount
LedgerDimension
DimensionAttributeValueCombina
tion
Main Account
MainAccountNum
MainAccount
MainAccount
Ledger Account
LedgerDimensionAccount
LedgerDimension
DimensionAttributeValueCombina
tion
Default Dimension
DimensionDefault
DefaultDimension
DimensionAttributeValueSet
Default Account
• Default main account + structure
• This pattern is referred to as the “LA.A” (Ledger Account.A) pattern. There are
various forms in the system that only needs to specify the main account plus the
account structure to be used for defaulting purposes. A foreign key representing a
default account is a 64 bit integer field that contains the data from the corresponding
RecId field the DimensionAttributeValueCombination (LedgerDimension) table as
shown here:
•
•
• The Default Account Control is the combination of the Segmented Entry Control and
the LedgerDimensionDefaultAccountController class. The Segmented Entry Control is
a general purpose control that was introduced to AX 6 and the
LedgerDimensionDefaultAccountController class is a class that handles the events
raised by the Segmented Entry Control.
Main Account
• The Main Account pattern represents just one of the potential
segments in a ledger account. When referencing a Main
Account as a foreign key a developer should setup a reference
to the RecId field in the MainAccount table. There is no special
control for this pattern.
• The most interesting issue when doing reporting or general
querying of MainAccount data is that most of the fields are
shared through the chart of accounts that is specified in the
MainAccount table. Each MainAccount record must have a
valid chart of accounts foreign key. Only 1 chart of accounts
can be specified for a given ledger.
Ledger Account
• A ledger account contains the main account, account
structure, and each financial dimension value needed to fulfill
the related account structure and account rule structures. A
foreign key representing a ledger account is a 64 bit integer
field that contains the data from the corresponding RecId field
the DimensionAttributeValueCombination (LedgerDimension)
table.
• The ledger account control uses the
LedgerDimensionAccountController class as its controller
class. This control handles the entry and display of ledger
accounts in AX forms.
Default Dimension
• This pattern represents a set of financial dimensions and their related
values. All default dimensions are tracked without any respect to structure
or active dates or closed states. Since they are used as defaults, they get
validated by the account number control or defaulting engine when used on
a transaction. At that time validation is performed to determine if the
default can be used or not.
• A dimension set is a list of 1 or more dimension attributes that are being
tracked for a particular purpose. Each element has an enumeration value.
• In simple scenarios the changes needed on an AX form are as follows:
•
Dimension APIs
• DimensionStorage
• DimensionStorage::getMainAccountFromLedgerDimension
• DimensionStorage::getMainAccountNameFromLedgerDimension
• DimensionConversionHelper
• DimensionConversionHelper::getNativeDefaultAccount()
• DimensionConversionHelper::getNativeDefaultDimension()
• DimensionConversionHelper::getNativeLedgerDimension ()
• DimensionDefaultingService
• DimensionDefaultingService::serviceCreateLedgerDimension()
• DimensionDefaultingService::serviceMergeLedgerDimensions()
• DimensionAttributeValueCombination
• DimensionAttributeValueCombination::getDisplayValue()
Dimension most Useful View
Demo - Ledger Account
How to implement Ledger account on the existing form.
1.
2.
3.
4.
Verify that the table that holds the Foreign Key to the
DimensionAttributeValueCombination table is a data source on
the form.
Drag the LedgerDimension field from the data source to the
desired location on form design.
Add code for controller initialization in the init method of the
form.
Override methods on the SegmentedEntry controls
Download