Wednesday 27 July 2016

MS Dynamics AX 7 Development - Packages, Models, Projects

Packages, Models, Projects in AX 7. Let's figure out what is it.

Package in AX 7 is independent deployable unit of one or more model.
Model is a group of elements (metadata and source files) that typically constitute a distributable software solution.
Project - simple Visual Studio project that stores AOT elements. The project helps you group the elements.


A simple way to understand is described on image below.


Package are folders located in the model store folder of the AX 7 application. The default model store folder is “c:\packages”.




Model folders are contained in their package folder. A model folder contains type-specific folders.



Every dependency of packages are described in descriptor files and can be shown in AX 7 viewer.



In model view, AE is organized by models. The package that a model belongs to is shown in parenthesis next to the model name.



The main purpose of VS project is to store AOT elements. AX 7 has not Shared or Private projects. Each user has their own projects that each of them related only to one model. Use multiple projects in Visual Studio solution to work with elements from different models.

Task Recorder In AX 7.0

Hi Guys,

Here i am sharing steps for how to use task recorder in AX 7.0.

Step 1 ->  Go to Navigation Pane > Task Recorder.



The Task Recorder Pane ope

Note :The user may click the “X” in the upper-right corner to close the Task Recorder Pane before beginning a new recording. The pane can be reopened by following the previous steps.

Step 2 : Click Create to create a new recording. Enter a name for the recording and click Start. Recording begins the moment   Start is clicked.

Note: During recording, clicking the “X” in the upper-right corner will hide the pane without stopping the recording. The pane can be re-opened by clicking the Task recorder menu button that appears at the top of the screen. This icon only appears while recording is in progress.
This image shows the Task recorder toolbar button which allows opening the Task recorder pane while recording.

Once you are done with the recording click on "Stop" button to stop recording.

Finally you can save your recording in your local PC, life cycle services, you can download it as word document and save as developer recording(XML Format).

@Rahul Talasila

Tuesday 26 July 2016

Microsoft Dynamics AX 7.0 Development System Requirements

The Microsoft Dynamics AX development environments can be hosted locally or in Microsoft Azure.
The build process, X++ compilation and generation of cross reference information, will typically run satisfactorily on machines with 16 GB of memory and 2 CPU cores. However, the compiler will use available resources, so more RAM and more cores may translate into faster compilations, especially if there is contention for the resources from other processes running concurrently. In such cases, we recommend 24 GB of memory with 4 cores.
At a minimum, 2 CPU cores are recommended because the Dynamics AX developer environment contains many components that may be running concurrently, including the AOS web application, Visual Studio, Management Reporter, and SQL Server.
@Rahul Talasila

Tuesday 19 July 2016

Microsoft Dynamics AX 7.0/Rainer Architecture

There have been some changes in the application stack and server architecture to align with the three key pillars in Microsoft Dynamics AX 7.0 or Rainer:
  • New client
  • Cloud readiness
  • New development stack
The application stack has been divided into three separate models: Application Platform, Application Foundation, and Application Suite. The separation enables new application development on the base foundation models, just as the Fleet Management sample application has been developed.
Note the following important points about the changes in the server architecture:
  • The services endpoint on the server is now responsible for returning all form and control metadata and data to the browser-based client. There is no longer any remote procedure call (RPC)-based communication with the server. The form objects still run on the server, and rendering has been optimized for browsers and other clients through server and client-side (browser) investments.
  • The server, including the application code base, is deployed to an Internet Information Services (IIS) web application. In the cloud, it’s deployed to Microsoft Azure infrastructure as a service (IaaS) virtual machines (VMs).
  • Dynamics AX is hosted on Azure and is available for access through the Internet. A user can use a combination of clients and credentials to access it. The recommended primary identity provider is OrgID, and the store for the identity is Azure Active Directory (Azure AD). The security subsystem uses the same AuthZ semantics for users and roles.
  • Two types of clients must be considered for access to Dynamics AX in the cloud: active clients and passive clients.
    • Active clients can programmatically initiate actions based on responses from the server. An active client doesn’t rely on HTTP redirects for authentication. A smart/rich client is an example of an active client.
    • Passive clients can’t programmatically initiate actions based on responses from the server. A passive client relies on HTTP redirects for authentication. A web browser is an example of a passive client.
    Currently, Access Control Service (ACS) doesn’t support a mechanism for non-interactive authentication. Therefore, even when active clients try to authenticate against Dynamics AX by using ACS, they must use passive client authentication, in which a browser dialog box prompts the user to enter his or her credentials.
  • A completely revamped metadata subsystem incorporates the new compiler and Microsoft Visual Studio–based development model. The model store is represented as a set of folders and XML artifacts that are organized by model. Dynamics AX model elements, such as tables, forms, and classes, are represented by an XML file that contains both metadata and source code.
The left side of the following diagram shows how the application stack has been split into distinct models. The right side shows how the key components are stacked in the server.

Microsoft Dynamics AX 2012 unionizes permissions that are granted to a user. However, an issue can occur when a data source is granted read permissions through an entry point and edit permissions through a form. Because permissions are unionized, the user eventually has edit permissions to that data source in this case. However, if the form was granted read access through a menu item, the expectation is that the data source can’t be edited through that path. Therefore, the context of the call isn’t honored.
In Dynamics AX, the context of the call is honored, based on the permissions that are granted through the entry point. If the form was granted read access through a menu item, the framework grants the user only read access to the table. However, if the same form is opened through another menu item that provides write access, the form is granted write permissions. This behavior simplifies the development experience, because developers can specify the desired behavior for a form through a given entry point.

Cloud architecture

The cloud architecture includes services that automate software deployment and provisioning, operational monitoring and reporting, and seamless application lifecycle management.
The cloud architecture consists of three main conceptual areas:
  • Microsoft Dynamics Lifecycle Services (LCS) – LCS is a multi-tenant shared service that enables a wide range of lifecycle-related capabilities for Microsoft Dynamics AX. Capabilities that are specific to this release include software development, customer provisioning, service level agreement (SLA) monitoring, and reporting capabilities.
  • Microsoft Dynamics AX – Dynamics AX VM instances are deployed through LCS to your Azure subscription. Various topologies are available: demo, development/test, and high-availability production topologies.
  • Shared Microsoft services – Dynamics AX uses several Microsoft services to enable a “One Microsoft” solution where customers can manage a single sign-in, subscription management, and billing relationship with Microsoft across Dynamics AX, Microsoft Office 365, and other online services.
Dynamics AX uses many features of the Azure platform, such as Microsoft Azure Storage, networking, monitoring, and SQL Azure, to name a few.  Shared services put into operation and orchestrate the application lifecycle of the Dynamics AX environments for participants. Together, Azure functionality and LCS that are built for Dynamics AX will offer a robust cloud service.

Development environment

The architecture of a Dynamics AX development environment resembles the architecture of the Dynamics AX cloud instance. It also includes the Dynamics AX software development kit (SDK), which consists of the Visual Studio development tools and other components.
Source control through Team Foundation Server or Visual Studio Online enables multiple-developer scenarios, where each developer uses his or her own Dynamics AX development environment. Deployment packages can be compiled and generated on a development environment and deployed to cloud instances by using LCS.
The following diagram shows how the key components interact in a Dynamics AX development environment.
CloudEnvironmentTechConcepts

Source : https://ax.help.dynamics.com/en/wiki/architecture-changes-in-ax-7/

@Rahul

Monday 18 July 2016

Restore the DB, Showing DB in use In AX 2012

Recently I was facing some issue while restoring AX database, whenever I try to restore the Transactional DB its show error "DB is use" while actually this DB is not used anywhere. Than I try to take take the database offline, But again there was one other issue.

Same issue again DB offline taking very long time.
I tried below steps and this worked for me. :) 
Step 1: Try to run below two queries in same given sequence. 
i. ALTER DATABASE <DBNAME> SET OFFLINE WITH ROLLBACK IMMEDIATE
ii. ALTER DATABASE <DBNAME> SET Offline
Step 2: Now try to take offline manually. 

clip_image001
Step 3: Restore the DB.
Step 4: Some time after doing restoration/backup DB will not work.
Than u need to roll back above query operation 
ALTER DATABASE <DBNAME> SET online WITH ROLLBACK IMMEDIATE 
ALTER DATABASE <DBNAME> SET online. 

How to Export/Import Label files in AX 2012

Label are pretty different in AX2012 instead of earlier version of AX. Here is quick steps to import and export Label files from one Environment to other. You also perform an update on label files. 
Export a Label file:
Open AOT, Expend Label node. Choose Label and require language to export. You can do it for individual language or you can select multiple language all in once.
image
Exported file will save on selected path with extension “.ald”.
Import Label File:
Right click on Label node in AOT and select “Create from File”, choose ald file to import than hit create.
image



Update a Label file:
Import the new updated label file system will ask to overwrite , go ahead
image
It will update your existing Label file.
Note: You must run full Synch after every import/Update.

Adding a newline into a string in C# and X++

Below is the sample code we can use for  adding a newline after every occurrence of "@" symbol in the string in C#   using System...