Skip to main content


Showing posts from May, 2017

Dynamics 365 For Operations [D365FO]: Ledger dimension and Default dimension helper class

Hello guys, I would be posting the important classes which handles the ledger dimension and default dimension logics like merging or replacing in D365FO (Dynamics 365 for operations). Like how we used to have DiemsionDefaultingService class in AX2012, We have the following two classes shown below:
LedgerDimensionFacade : 
This class used for fixed LedgerDimension, we have many static methods here, like Merge Dimension, getdefaultDimension and many more, refer below image.

publicstaticDimensionDisplayValue getDisplayValueForLedgerDimension(DimensionCombinationBase _dimensionCombinationBase)     { DimensionAttributeValueCombination dimensionAttributeValueCombination;
if (_dimensionCombinationBase == 0)         { return"";         }
selectfirstonly DisplayValue from dimensionAttributeValueCombination where dimensionAttributeValueCombination.RecId == _dimensionCombinationBase;
return dimensionAttributeValueCombination.DisplayValue;     }

Dynamics AX7 / D3FO: Code for Excel importing

Now Dynamics AX 365 is running on Web browser so import the data in AX using Excel, CSV, text etc. has been changed. FileName, FilenameOpen extended data type is no more supported to browse the excel file. If we compare Excel file import process between AX 2012 and Dynamics AX 365 then in AX 2012 file was importing from Client (from local system) to AX database directly but now the new AX is running on web server over the IIS so to import file in AX mean first file need to import on server and need to store in File server or SharePoint or Database. And then read the file from stored location may be from File server, SharePoint or Database. So how we can import data in AX using Excel file? The simple way is via using Data entities and if data entity does not exist then need to create new Data entity for table and then we can import data via using the excel file or any other supported file using that Data entity. But sometime required to import the data in AX using dialog in that case Data…

AX7 / D3FO: Table extensions and their method sequence

You can create a table extension to extend a table's design and logic. You can add new fields, field groups, indexes, mappings and relations. You can also add new fields to existing field groups, change the label of a table field, change the Created By, Created Date Time, Modified By, Modified Date Time properties. In Microsoft Dynamics AX 2012, you could override the virtual methods of a table's base class to control the behavior that occurred during table operations, such as when creating, reading, updating, or deleting. In the current version, you instead use extensions to implement event handlers that are called from the base implementations of the table methods. The following table lists each table method and its events.
Published Table method Preceding event Succeeding event validateWrite ValidatingWrite ValidatedWrite validateDelete ValidatingDelete ValidatedDelete validateField ValidatingField ValidatedField

AX7 / D3FO: Form extensions and their method sequence

You can extend the functionality of a form by extending its controls and data sources. For example, in a form extension, you can: ·Add a new control. ·Enable or disable a control. ·Change the text or label property of a control. ·Change a control's visibility. ·Change a form's help text. ·Change a form's caption. ·Add a new data source. ·Change properties at the data-source level. ·Add a form part.
Other ways to customise a form, such as reordering controls in the form or subscribing to form or control events, are planned to be included in a future release. In Microsoft Dynamics AX 2012, you could override form methods. In the current version, you use extensions to implement event handlers that are called from the base implementations of form methods. The following table lists each method and its associated events.
Published form DataSource method Preceding event