Views:> Like a table, a view uses fields and rows to represent data records. However, the data in a view is not stored as a database object but is dynamically created when the view is accessed. A view uses a query to retrieve data fields from one or more database tables. >In Microsoft Dynamics AX, you can use views where you use tables. For example, you can use a view in a form, a report, and in X++ code. The following features shows the benefits of using a view instead of a table: 1. Focussed Data 2. Customized Data 3.Performance >When you create a view, the view definition is generated and stored in the database. When that view is accessed, the view dynamically retrieves the data that satisfies the view definition. >Views will help to see the data from multiple table fields in a single window[Table browser] >We cannot perform any DML operations on view [Create, update, delete, insert] >Only select query will get executed automatically when u open the view >Views are used on reports [extensively] and can also be used on forms >we cannot create any index or deleteactions on a view >we can never see the data in the view [ax OR FROM BACKEND] Because only select query will be triggered while opening the view View Elements: Views are located in the Application Object Tree (AOT) under the Data Dictionary\Views node. A view contains four primary nodes: Metadata : The Metadata node contains the query or data source that the view uses to retrieve data. A metadata query or data source is referred to as the view query. Fields : Phyisical columns you want in your views. Field Groups : Logical grouping of added physical columns. Methods : Methods on Views Example with complete steps :Before starting make sure you have created two table ie. SIB_CustTable and SIB_CustTrans (SIB herestand for south Indian Bnk but offcourse you can have your own two tables only thing is follow the steps)Go to AOT >> DataDictionary >> Views >> RC >> New view Name it as "SIB_CustomerView" and label as "Customer and transactions view" Expand the view and you wil find important node called 'MetaData" In the metadata - we need to add all the tables in the datasources node Drag and drop SIB_CustTable to the datasource node. Expand the newly created datasource node and you will find one more datasource node inside it/within it - drag and drop SIB_custTrans table under this. Right click on the newly created child datasource and set the relations property to "Yes" Go to fields node and drag some fields from first datasource and some fields from child/second data datasource >Finally Right click and open the view, you will find that all the linked records will be displayed in the view with no DML operations >The record id in the view will be always the parent datasource recid and recversion will be always 0 >You can use this view on the form, reports etc.Hope this is helpful to u I think you will not find the steps which I gave on any microsoft training material, so cheers :)
Thursday, 13 February 2014
Views in Dynamics Ax with example and detail creation steps.
Sunday, 26 January 2014
Macros in Microsoft dynamics Ax
Macro :
- Macros are reusable components
- Macros are mostly used to remove hardcoding and for constant values
- Macros are pre-compiled/FASTER
- In AX, we have a macro processor
- Macros cannot be debugged
- Macros reduces line of code/optimizes the lines of code
- Macros will not end with semicolon
1) Local Macro
2) AOT Macro [Global macro - we can call it in all objects, tables, forms, jobs, reports etc]
3) Macro library
3) Macro library
1) Local Macro :
Local macro is a mcaro which is local to that function and cannot be used outside the method/function
static void TDS_LocalMacro(Args _args)
{
#define.pi(3.142)
#define.name('Tony')
#define.address('SR Nagar, Hyd')
;
info(strfmt('%1',#pi));
info(#name);
info(#name + "is a bad person");
info(#address);
}
{
#define.pi(3.142)
#define.name('Tony')
#define.address('SR Nagar, Hyd')
;
info(strfmt('%1',#pi));
info(#name);
info(#name + "is a bad person");
info(#address);
}
2) AOT Macro :
AOT Macros will help to resue the functions inside it.
>>Go to AOT >> Macros >> Right click on the Macros node >> New Macro >> rename it to TDSAdd 4 functions inside the macros by doubling clicking it
>>Go to AOT >> Macros >> Right click on the Macros node >> New Macro >> rename it to TDSAdd 4 functions inside the macros by doubling clicking it
#define.college('SR College')
#define.age(30)
#define.inst('Vertex soft')
#define.cl(4000.00)
#define.age(30)
#define.inst('Vertex soft')
#define.cl(4000.00)
>>How to call AOT Macro
>>Create a new job as shown below
>>Create a new job as shown below
static void TDS_CallAOTMacro(Args _args)
{
#TDS
;
info(#college);
info(int2str#age));
}
{
#TDS
;
info(#college);
info(int2str#age));
}
>>How to use in any other object:
Go to TDS_CustTable >> Methods >> Override initvalue() method and paste the following code
Go to TDS_CustTable >> Methods >> Override initvalue() method and paste the following code
public void initValue()
{
#TDS
;
super();
this.Creditlimit = #cl;
this.JoinedDate = systemdateget();
}
{
#TDS
;
super();
this.Creditlimit = #cl;
this.JoinedDate = systemdateget();
}
3) Macro library :
Microsoft has already given many macros in AOT >> Macros node
[sys] layer
we can go ahead and add any function to already existing macros [sys layer]
Microsoft has already given many macros in AOT >> Macros node
[sys] layer
we can go ahead and add any function to already existing macros [sys layer]
AOT >> Macros >> AOTExport >> open in editor and add a new function at the end
#define.marks(30)
How to call Macro library macro
How to call Macro library macro
static void TDS_MacroLib(Args _args)
{
#aotexport //#macrolib.aotexport
;
info(int2str(#marks));
}
{
#aotexport //#macrolib.aotexport
;
info(int2str(#marks));
}
How to pass values or nuMber of lines in Macros: possible
static void TDS_PassingValues_Macro(Args _args)
{
int c;
#localmacro.sum
c = %1 + %2;
#endmacro
;
#sum(10,20)
info(int2str(C));
#sum(1000,5466)
info(int2str(c));
}
{
int c;
#localmacro.sum
c = %1 + %2;
#endmacro
;
#sum(10,20)
info(int2str(C));
#sum(1000,5466)
info(int2str(c));
}
Macros reduces number of lines of code as well
static void TDS_PassingValues_Macro(Args _args)
{
int c;
#localmacro.sum
c = %1 + %2;
c = c - 4;
c = c * 4/100;
#endmacro
;
#sum(10,20)
info(int2str(C));
#sum(1000,5466)
info(int2str(c));
}
{
int c;
#localmacro.sum
c = %1 + %2;
c = c - 4;
c = c * 4/100;
#endmacro
;
#sum(10,20)
info(int2str(C));
#sum(1000,5466)
info(int2str(c));
}
Note : It is best practice to use macros only to define constants. Also TDS stands for Tushar Devendra Srivastava just using my initials as best pratice for creating my own customizations.
Hope you find it useful..... :)
Wednesday, 15 January 2014
Implementation methodology in Microsoft Dynamics Ax
Hi floks,
Methodology for deploying Microsoft Dynamics AX is divided into the following phases:
For more just go through this link : http://technet.microsoft.com/en-us/library/aa496439.aspx
Methodology for deploying Microsoft Dynamics AX is divided into the following phases:
|
S.
NO
|
Phase
|
Tasks
during phase
|
|
1
|
Diagnostics
|
|
|
2
|
Analysis
|
|
|
3
|
Design
|
Create
documents:
|
|
4
|
Development
|
|
|
5
|
Deployment
|
|
|
6
|
Operation
|
These
are on-going activities that continue after project close and
throughout any future involvement with the client.
|
|
7
|
Optimization
|
The
purpose of this phase is to help the customer optimize the benefit
they get from the business solution.
|
|
8
|
Upgrade
|
|
For more just go through this link : http://technet.microsoft.com/en-us/library/aa496439.aspx
Monday, 2 December 2013
Major differences between Microsoft Dynamics AX 2009 and AX 2012.
I
just tried to find some major MorphX development features that have been added or changed in in
Microsoft Dynamics AX 2009 when compared with AX 2012. I observed changes in the following concepts of AX :
1.Models
and the Model Store
2.Object
IDs
3.The
AxUtil Command Line Utility and PowerShell Cmdlets
4.Development
Workspace
5.Some
Layers Have Been Renamed
6.Installation-specific
Ids
|
Sr No.
|
Microsoft
Dynamics AX 2009
|
Microsoft
Dynamics AX 2012
|
Why
is this important?
|
|
1.
Models and the Model Store
|
The
model store did not
exist
in Microsoft
Dynamics
AX 2009.
Application
model data was stored in .aod files. You can load .aod files
during version upgrade. You can also load .aod files by using the
Tools
menu.
|
The
following model features are new:
1.
A model is a set of model elements in a specific
layer.
2.
Each layer consists of one or more models. One of
the
models is generated by the system. For example,
VAR
Model is the model that is generated for the VAR
layer.
3.
Each element in a layer must belong to only one
model.
4.
Models can be exported to a file artifact that is
called
a model file. Model files have an .axmodel
extension.
A model file is like an .aod file from earlier
versions,
but the names and numbers are not limited.
Models
in the model store can be exported to model
files
and imported from model files. Model files can
be
signed, and the signature is verified when the
model
files are installed.
5.
Model files replace
.aod files as
installation
artifacts.
6.
Models in the SQL Server–based model store
replace
.aod files that were used at run time.
7.
Development is performed in the current model in
any
given layer. All development work, such as
creating
a new class, becomes part of the current
model
in the current layer. You can change the
current
model by clicking the name of the current
model
on the status bar, similarly to the way that you
change
the current company.
8.Any
element that is created in the current layer can
easily
be moved to another model in the same layer.
9.
The Application Object Tree (AOT) shows you
which
model a particular element belongs to, in
addition
to the layer tags.
10.
The additional folder capabilities for version control have been
renamed models, and the capabilities have been extended. When you
add an element to version control, the element is added to the
version-controlled model.
11.
You can generate a MorphX project that contains all of the
application objects in the model. A new Model
management submenu
on the Tools
menu
contains many tools that you can use to work with
models
and the model store.
12.
The new SysModel* system tables provide a view of the metadata
that is associated with models. These tables enable you to use
model metadata in select
statements
in your X++ code. For example, you can use the
SysModelElementLabel table to retrieve the string value for the
label that is associated with a particular model element.
|
Storing
models in SQL
Server
increases quality,
reliability,and
performance.In
addition,
you can use
the
tools that are
available
in SQL Server
forbackupand
administration
|
|
2.
Object ID's
|
Object
IDs were 16 bits long
|
Object
IDs are 32 bits long
|
Changing
the length of
object
IDs from 16 bits to 32 bits exponentially increases the number of
object IDs that are available.
|
|
3.
The AxUtil Command-Line
Utility and PowerShe ll Cmdlets
|
The
feature was not available
|
AxUtil
is
a command-line utility that you can use to import and export
.axmodel files into the SQL Server model store. You can also use
AxUtil to delete one or models, create new empty models, and list
all models in a layer. All of the capabilities of AxUtil are also
exposed as PowerShell CmdLets.
|
Users
can use these tools to work with models from outside the
development environment. Therefore there are more options for
scripting deployment processes.
|
|
4.Development
Workspace
|
Development
occurred directly in the Application Workspace.
|
The
Developer Workspace contains all of the tools that a developer
must have to create and customize a Microsoft Dynamics AX
application.
Changes
that you save in the Development Workspace are always synchronized
with the Application Workspace. You can still open application
elements in the AOT. You can also open an Application Workspace
from the Development
Workspace
to view your customizations. You can open Microsoft Dynamics AX
directly from a write Development Workspace by using the Ax32.exe
command-line flag.
|
The
new Development Workspace provides a morestreamlined environment
for writing code. The menus have also been customized to make it
easier to find the tools and commands that you use when you code.
|
|
5.
Layers
|
Old
layer names:
USP
USR
CUP
CUS
VAP
VAR
BUP
BUS
SL3
SL2
SL1
HFX
GLP
GLS
SYP
SYS
|
New layer names:
USP
USR
CUP
CUS
VAP
VAR
ISP
ISV
SLP
SLN
FPP
FPK
GLP
GLS
SYP
SYS
|
The
new layer names more accurately describe the usage of the layers
|
|
6.
Installati on
|
Objects
IDs were assigned when a model was created.
|
When
a new model element is saved, imported, or element installed, a
unique ID is assigned to the model element at that installation
site.
For
example, when a new class is added by a developer and saved to the
model store, the class is assigned a class ID. However, when the
same class is imported into another installation at a customer
site,
the
class ID may be different from the ID that was assigned in the
first installation site. The new object IDs that are assigned for
Microsoft
Dynamics
AX 2012 installations have a larger range than the previous object
IDs and will not conflict with any of the earlier versions of
Microsoft Dynamics AX. In an upgrade scenario, object IDs are
preserved, because they are automatically assigned to the new
LegacyId property on the application objects.
|
Because
of installation-
specific
IDs, conflicts are
avoided,
because an ID
is
not assigned until
installation
time.
Because
the assignment
of
object IDs is handled
at
the installation site,
Team
Server no longer
has
to manage IDs.
Team
Server is no longer
installed,
and the setup
of
version control is no
longer
dependent on
Team
Server.
|
|
7.
Modules
|
General
Ledger
Bank
Accounts
Payable
Accounts
Receivables
Inventory
Management
Expense
management
Production
Project
|
General
Ledger
Fixed
Assets (New)
Cash
and bank management
Accounts
Payable
Procurement
and sourcing (New)
Accounts
Receivables
Sales
and Marketing (New)
Product
information (New)
Inventory
and warehouse management
Travel
and expense management
Production
control
Project
management and accounting
Compliance
and internal control (New)
|
|
|
8.
|
Support SQL Sever 2005 and 2008
Support Oracle Database
|
Only Support SQL Sever 2008
Does't support Oracle Database
|
|
Hope
you find the above information useful.... :)
Wednesday, 16 October 2013
All about ERP and Microsoft Dynamics Ax
Lets start with What is ERP? It means enterprise resource planning, which itself means planning the resources in an enterprise (business). So, this abbreviation simply means, that this is a way of more effectively using the resources which can be man or material in a company or Enterprise. Notice, that this is not some kind of software, this is an ideology and thus in-order to implement this ideology the idea of ERP solutions emerged and some software are designed like “SAP” by SAP LAB, Oracle corporation's “ORACLE APPS” Microsoft Corporation's “MIROSOFT DYNAMICS AX” etc.
Thus Enterprise resource planning (ERP) is business management software that allows an organisation to use a system of integrated applications to manage the business. ERP software integrates all facets of an operation, including product planning, development, manufacturing processes, sales and marketing. Microsoft Dynamics Ax is thus a customisable, multiple-language, and multiple-currency Enterprise Resource Planning (ERP) solution. Microsoft Dynamics AX excels in :
Manufacturing.
E-business.
Wholesale.
Services industries.
Now further will try to understand this with just a small example....
Suppose I have a Small grocery store and I have a habit of keeping all record in a small book ie. how many items and in how much quantity I have, what was my sell today and what profit I made and so many other things. Because its a small shop I am able to maintain all record in a book but imagine if I am running a company where my company is manufacturing some product, where I am buying some spare parts from small companies so need to keep track of what quantity I purchased what amount I need to pay, there are huge number of employee's so again I need to track all thing like salaries, there are number of different customers so I need to track their orders and accept their payments, I am storing these products in some warehouse so need to keep track of what quantity of product is required and how much is available in warehouse and how much more production need to be done.... and if there are any handling losses in the warehouse .... and lots of other stuff so I cannot just maintain all these information manually so I felt the need for some automation. And software companies like Microsoft came with product or we can say a software which facilicated and automated all my transactions and other tasks and that software is Microsoft Dyanamics AX.
Microsoft Dynamics Ax provides different modules like “Inventory and Warehouse management”, “Product Information management”, “Accounts Receivable”, “Accounts Payable”,”General Ledger”...etc these modules are used to manage all the tasks that I mentioned above. To understand these modules I might need to write something more which I think is not my aim right now, if demanded I will come up with some explanations of these modules.
Hushh....Even I am tied now but I hope that you must have got an good Idea about ERP and Microsoft Dynamics Ax.
Sunday, 6 October 2013
About the blog.
This blog is about Microsoft's ERP product called Microsoft Dynamics Ax. Microsoft dynamics Ax is a business solution that supports both operational and administrative processes of organizations, this single solution comes with localizations—in the box—for 36 countries. With a specialized focus on manufacturing, retail, service industries, and public sector, Microsoft Dynamics AX includes capabilities such as financial management, manufacturing, retail, business intelligence and reporting, supply chain management, and human capital management.
In this blog I will try to share knowledge of the subject and would like you all to contribute on the same. Hope to have fun with all the people associated with ERP.
In this blog I will try to share knowledge of the subject and would like you all to contribute on the same. Hope to have fun with all the people associated with ERP.
Subscribe to:
Posts (Atom)