Tuesday, 6 June 2017

Summary of new features in the latest platform updates of Microsoft Dynamics 365 for finance and operations enterprise edition (formerly known as Dynamics AX)

A quick summary of new features in the latest platform updates of Microsoft Dynamics 365 for finance and operations enterprise edition (formerly known as Dynamics AX)

Platform update  11  (Oct - 2017)

  • Attachment presence and document count indicator.When viewing a record, the system will indicate the number of attachments on that record by showing a count on the Attachments button.
  • The system logs when a user signs in or out of the application.
  • Bring your own data store (BYOD) is a feature that’s used by customers to integrate data from Finance and Operations with existing data warehouses.
  • The metadata properties, Operational domain and Subscriber access level have been added for tables, views, data entities, menu items, and service operations. The new metadata properties are needed to support Cloud and Edge deployments, and are visible in Microsoft Visual Studio.
  • Copy data to new entities - As new companies are needed, users will be able to save time and potential errors by copying an existing legal entity’s setup to the new company.
  • Development and customization - Field groups - Extension of another extension supported. All fields are recognized and rendered at runtime by the user interface if there are multiple extensions of table with same field groups.
  • You can now use class extensions (table class extensions) to define display and edit methods.
  • When you extend a table and add a new field to the table extension, if the new field is of type EDT that is an array, you can now access EDT array fields from X++ code.
  •  If the EDT element you are extending has the property Number of Decimals is Extensible set to True, you can create an extension of this EDT and modify the No of Decimals property.
  • The framework has been extended to better handle scenarios where reporting sessions produce multiple documents for download. Instead of receiving multiple documents, one after another, the documents will be packaged and downloaded in a single .zip file.
  • Resource governor uses the built-in resource governance services offered by SQL Azure database. Dynamics 365 for Finance and Operations Runtime service allocates quotas for interactive, as well as batch processes, so that SQL Azure database (where most of the compute is performed) does not degrade if there are sudden compute spikes.

Platform update 10 (Aug - 2017)

  • Browser client - Net Promoter Score integration. This feature will periodically prompt the user to provide feedback and rank their satisfaction with Dynamics 365 for Finance and Operations, Enterprise edition.
  • Key sequences are now supported. A key sequence allows a particular action to be triggered by pressing two key combinations sequentially
  • This release introduces a new model for creating and maintaining mobile workspaces through X++ classes in Microsoft Visual Studio.
  • Make users more productive when using the Excel add-in to create and edit transactional data, by allowing the creation of header records in addition to line records.

Platform update 9 (July 2017)

  • Batch job history clean-up. Functionality to clean up the history of batch jobs has been added (this functionality was available in Dynamics AX 2012). This feature allows you to delete all or any subset of batch job history by clicking a button.
  • Usage data is automatically reset upon moving to Platform update 9. Users will lose their usage data as part of this platform update process. This mostly includes data used for custom queries and saved dialog posting selections. Personalization is not affected.
  • Method wrapping and chain of command - Allow developers to wrap logic around methods defined in a base class. This allows extending the logic of public and protected methods without the need to use event handlers. When you wrap a method, you can also access other public and protected methods and variables of the class.
  • OData batch request size configuration- The default OData batch request size is 1,000 records. Microsoft can now change the size of OData batch requests for customers. Customers must log a support request through LCS to the Dynamics Service Engineering team (DSE) to increase the batch size up to a maximum value of 5,000 records.

Platform Update 8 (June 2017)

  • Changing the extended data type (EDT) on a table field using table extensions
  • Enhanced viewing experience while interacting with both document and analytical style application reports
  • The table browser form is now in read-only mode on runtime environments (Sandbox Tier-2 and Production).
  • Highlight - On premises deployment option. A new deployment option that will not require business data to be stored in the cloud. This deployment option supports running your business processes on-premises, supporting local transactions and storage of local business data, without replication of your business data to the Microsoft cloud. 

  • Configuration data projects - This feature provides an updated user interface to easily export configuration data, and the ability to easily manage templates and projects.
  • Static export to Excel limit increase from 2k to 10k - The static Export to Excel limit has been increased from 2k to 10k to allow more rows to be exported from a grid
  • Development tooling - New tabbed workspace pattern - You can now include tab pages that house embedded Power BI reports
  • Development and customization - Extending a group control - Support for extending an extended form, for example, extending a form that is already extended in a referenced model
  • Development and customization - Extending the Country Region Codes property
  • Development and customization - Validating events on form data sources and form data source fields - Validation events on form data source (FormDataSourceEventType) and form data source fields (FormDataFieldEventType) now support invalidating user-specified values.

Platform update 6 (April 2017)

  • Ideas portal - With the Ideas portal, all Dynamics 365 for Operations users can submit new ideas, vote on existing ideas, and track status of their ideas in a consistent manner.
  • Browser framework - New control for developers  PowerApps Host control. Dynamics 365 for Operations introduces a new control for developers, the PowerApps Host control.
  • Browser client - Ability to model toolbar actions in the overflow menu
  • Build automation - Automatic update of model version during build
  • Build automation - Option to include runtime packages in the deployable package of the automated build output
  • Number sequence scope extensibility - You can now extend the number sequence scope through extensions.
  • Mobile - ability to set workspace visibility for different user groups
  • Mobile - Added the ability to auto detect required attributes, through form and table metadata, to denote mobile fields as mandatory during data entry
  • Mobile - Option to fully localize mobile workspaces for all Dynamics 365 for Operations supported languages.

 Platform update 5 (March 2017)

  • EventHandlerResult classes in request or response scenarios - You can now use the EventHandlerResult class for scenarios where the delegate (event) logic requires its subscribers (event handlers) to provide at least one response so that no result is lost when there are multiple subscribers and multiple results.
  • Customization Analysis Report (CAR) justification - When you suppress a best practice warning within a suppression file in the AxIgnoreDiagnosticList folder of your model, and include a justification, the justification text will appear in the CAR report of your model.
  • Telemetry - When a model is built, the telemetry framework collects information about Microsoft classes and methods that are referenced by customer and ISV code. This provides Microsoft with much needed information regarding what part of the standard application code is included in backward compatibility requirements
  • X++ compiler and try catch blocks - DuplicateKey and UpdateConflict exceptions do not roll back a running transaction, are no longer caught in the catch all.
  • Personalization - Enhanced administration features for personalization.The personalization administrator can now apply or remove form personalizations for groups of users. Previously personalization administration was only possible one user at a time.

Platform update 4 (February 2017)

  • Monthly updates: Dynamics 365 for operation releases moved to monthly updates pattern.
  • Embedded Power BI reports are licensed for all users: Additional functionality is available for users who have Power BI Pro licenses.
  • Build and release workspaces that have embedded Power BI reports: You can build and release workspaces that have embedded Power BI reports, to provide interactive and visually engaging experiences for users.
  • Mobility: Mobile framework is updated to build unique online and offline experiences. Mobile framework also starts supporting iOS and Android devices.
  • Visual scheduling: MS updated Gantt chart integration, added new visual icons, localized formats, updated user efficiency, and improved resource management features.
  • Feedback: You can provide your feedback to Microsoft for improvements.

Tuesday, 1 November 2016

Building and Consuming Data entities in Dynamics 365 for operations

Data entities are new concept introduced in Dynamics 365 for operations. The main purpose of data entities is to provide a single platform for data management. Additionally they also provide foundation for the services framework. It also enables file integration and recurring integrations.
Data entities replaces the AxD and DIXF frameworks of AX2012 and also simplifies ALM process where we can create data packages and export import between different environments.

Below diagram shows how data entities provides platform for different scenarions.


You can think of data entities as updatable views to tables.Let's do a quick walkthrough on developing and then exporting/importing data using  data entity for a custom table.
To keep it simple I created a new table with 2 fields, ID and Name. Remember to have unique index defined on the table and use it as the primary index on the table. Below is the table structure:

 To create a data entity for this table we can either using entity wizard by right clicking on the table and then selecting the AddIns option (as shown below)

or by adding a new item of type data entity in the project.
Let's add it manually , select data entity on the add new item screen

Select the primary data source, in this case it will be our new table
The entity category field is to tag the category of the entity. It will help to filter the entity on the client.
The check box to enable public API is used to expose the entity via OData. If we turn it off then the entity will still be available for data management platform but won't be accessible via OData.
On the next page system will show the list of all the fields in the table you have added . This screen is quite interesting and important as you can setup your entity.
We can uncheck some fields if we do not want to expose, or make them mandatory even if they are not mandatory for tables.
We can add more data sources if we want. Let's leave it as is for now.

Once finished, system will create some artifacts  - A staging table, entity and related security privileges.

Staging table has some system generated fields like the definition group, execution ID etc.

Build the solution and synchronise the table.

We can now view the entity in the list of entities available under data management workspace

We can filter the list

 We can view the structure and mappings from the options on the form

So now we are done with creating a new entity for a custom table.
Let's import some data in the table: I created a csv file with two fields and the data as the entity structure is quite straightforward in this case

Enter the new import job details, select format and entity name and then click on upload

Once you click on upload you can select the csv file having data of your desired structure


Click on Import and then we get the below notification
We can view the execution summary

Once the data is imported we can see the details and the job status

View the  data with the help of inquiry buttons on the form
We can browse the table and view the data as well.
Lets add new record and save it from table browser


Now lets do a quick export of the data. First we create an export job
Click on Add entity after defining the data format and the entity
Once the mapping is done, click on export , the job is scheduled

Once the job completes, we get a notification

We can view the execution details

We can also download the file created by the job by clicking on the ellipse and download file 


Open and view the file. We can see the new row we added is exported

This was just a simple and quick walkthrough on how to develop and use data entities. Data management platform in Dyanamics 365 for operations offers lots & lots  more exciting stuff. Keep exploring and keep sharing.  Comments and feedbacks are appreciated. Thanks for reading the blog. 


Monday, 10 October 2016

Form patterns in AX 7

Hi Friends,
In the new AX, aka AX7, form patterns are introduced. These are evolution of the AX 2012 form templates so they have similar benefits and reasoning when comes to justifying there use. The way they work are bit different though. There were only few form templates in AX2012 but in the new AX, microsoft has introduced a whole new bunch of patterns. A major advantage is maintainability and upgradability of the forms. If a form is having a pattern applied to it then it will be easy to upgrade in future releases of the new AX.

The current form pattern is shown on the desing node. If there is no pattern applied then it is shown blank as shown below:

In order to apply a pattern , right click on the design node -> select Apply pattern and then choose the pattern from the list of available patterns, as shown below

Lets apply Simple list and detals - list grid pattern to our form. Once we apply the pattern, the expected form desing pattern is populated in the pattern tab. It shows which controls are missing, to match it to the pattern

As you start adding the controls to your design, the pattern tree keeps updating itself. In the below pic, as I added an Application bar, the control in the tree changes the state.

I added the remaining controls on the design.


We notice that there is a warning symbol next to a few controls. To view what is missing, click on the control under the design node. The particular control structure, as expected from the pattern, will be shown and we can see that we are missing few controls there.

Now we can add the missing controls 

Similarly we can do for other nodes in the design.

Another intresting thing which is new in AX7 is that we can apply sub patterns as well. I can apply a pattern to a tab page. To view the available patterns on the tab page, we can right click on the control and select apply pattern and view the available patterns as shown below:

One more intresting thing is that we can generate a form pattern report. To do this, go to Dynamics AX menu --> Addins --> Run form pattern report.

This generates a csv file which then can be examined to view which standard forms are using which patterns. It is very useful to build your solution as this can help us decide which pattern should be used for the new form. 
There are some great articles on Ax wiki related to form patterns:


Saturday, 11 July 2015

AX2012 R3 CU8 : X++ code to get resource requirements for production routes

Hi Friends,
The below X++ code, can be used to get the resource type and the resource ID defined on the production routes for a production order. Thanks to the methods available on ProdRoute table out of the box which makes this easy.

Below is the job simulating the code:

To quickly reuse the code here it is:

static void Job45(Args _args)
    ProdRoute                       prodRoute;
    RecId                           recId;
    WrkCtrId                        wrkCtrGrpId;
    ProdId                          prodId = "W000170";
    WrkCtrActivityRequirementType   relationShipType;
    WrkCtrActivityRequirement       wrkCtrActivityRequirement;

    while select prodRoute
        where prodRoute.ProdId == prodId
        recId = prodRoute.activityRequirementSet().RecId;

        select WrkCtrActivityRequirement
            where WrkCtrActivityRequirement.ActivityRequirementSet == recid;
        wrkCtrGrpId =  WrkCtrActivityRequirement.requirementEdit();
        relationShipType = WrkCtrActivityRequirement.RelationshipType;
        info(strFmt("%1, %2",relationShipType,wrkCtrGrpId));

Have a great day.

Saturday, 25 April 2015

AX2012 R3 : Scheduling dates using X++

Hi Friends,
When required to calculate a future/past dates using X++  based on the working times defined in the working calendar in AX, workcalendarsched class can be used to take off the pain.
The below job shows how we can use the schedDate function and get the result, for simplicity I have passed the calendar name defined in my system as a string:

TransDate       reqDate = systemdateget(), newReqDate;
workCalendarSched   workCalendarSched = new workCalendarSched();
newReqDate = workCalendarSched.schedDate(SchedDirection::Forward,reqDate,5,false,'STANDARD');

Another useful method in this class is isdateopen which can be used to check if a particular date is open in the calendar. The good thing about this class is that it uses SysGlobalObjectCache to store and retrieve the values. It improves the performance when running long and complex calculations.

Notice in the below method, if the key exists in cache then the value is returned from there itself else the cache is updated.

The below method of WorkCalendarSched class initialises the variables from global cache.

The global cache scope is stored on the combination of Class + current partition and current company as highlighted below:

This class is also a good example to understand how to use SysGlobalObjectCache.
Thanks for reading the blog. Keep sharing.

Friday, 10 April 2015

Importance of SaveLast() in RunBase Framework

Hi Friends,
RunBase Framework is widely used in AX. In this post, I would like to highlight the importance of SaveLast() function. Understanding of pack/unpack pattern is must to utilize this class in the most effective way.

SaveLast() is used to save the latest state of the class. That means even after the class is unpacked we can still update the packed state of the class.  

One common scenario where it is very useful is when we need to show the values of fields from the caller record on the dialog . In such scenarios this method needs to be called before the prompt() method . This way the packed state is updated with the latest values and in the dialog() method you can access the latest values. 

This can been seen in many standard AX classes which extend RunBase class

So if you are packing some variables, which you are also initialising in the main method and want to show on the dialog, then call saveLast() method before prompt() to get the most recent values.

Thanks for reading the blog. Have a great day.