Sunday 27 April 2014

Interesting Things in AX 2012 Installiaton & Administration

AX 2012 Integrated installation of service packs and updates

In previous releases, you could install service packs and updates
only after the Microsoft Dynamics AX installation was completed. Therefore,
depending on the number of updates that were available, you had to run several
installation wizards to complete the deployment. In Microsoft Dynamics AX 2012,
service packs and quarterly roll-up updates can be integrated into the
Microsoft Dynamics AX installation. This kind of installation is known as a
“slipstreamed” installation. If updates are available when you deploy
Microsoft Dynamics AX 2012, you can download them to the location of the
installation source. When you run Setup from the updated installation source,
all updates are applied automatically.
AX 2012 Flexible authentication
Since Microsoft Dynamics AX 4.0, user authentication has been
based on Active Directory. All users have been required to be domain users.
Even external users of Enterprise Portal have had to be domain users. To help
secure other data on the network, the administrator had to set up group
policies to prevent external users from accessing that data. In Microsoft
Dynamics AX 2012, users can be authenticated by using methods other than Active
Directory. Therefore, external users no longer require domain accounts to
access Microsoft Dynamics AX. For more information, see Configure Enterprise
Portal flexible authentication
AX 2012 Security
In Microsoft Dynamics AX 2012, security is role-based, and many security roles are predefined to make security easier to set up. In role-based security, users are assigned to roles based on their responsibilities in the organization and their participation in business processes. The administrator no longer has to identify application objects and grant access to those objects. Instead, the administrator grants access to the duties that users in a role perform. Because rules can be set up for automatic role assignment, the administrator does not have to be involved every time that a user’s responsibilities change. After security roles and rules have been set up, role assignments can be updated based on changes in business data
AX 2012 Database side changes
SQL Server-based databases
In Microsoft Dynamics AX 2012, you must create your Microsoft
Dynamics AX database on Microsoft SQL Server. Microsoft Dynamics AX 2012 does
not support creating the Microsoft Dynamics AX database on Oracle database
server. All other databases, such as the databases that are used for Microsoft
SharePoint 2010 products and Reporting Services, also require SQL Server.
Application files are now stored in the database
The previous version of Microsoft Dynamics AX stored the
application files, or AOD files, that contained Microsoft Dynamics AX metadata
on a file share. In this version, application objects are stored in the
Microsoft Dynamics AX database, and are managed as model files.
Fixed schema
This version of Microsoft Dynamics AX has a fixed schema, which
means that tables and fields are no longer dropped and then added again when
license or configuration keys are changed. This change applies to all tables
and fields, except for some that are used during upgrade (SysDeletedObjectsXX),
which are dropped when the relevant configuration keys are disabled in a
production environment.This change was made to better support Analysis Services
cubes in Role Centers.
Full-text search
In this version, Microsoft Dynamics AX provides full-text search,
which lets you search business data over a large volume of text data or
documents. Full-text search also supports additional features, such as
language-specific word breakers, stemmers, and extensible APIs. You can create
a full-text index on tables that are associated with the table types Main or Group.

Saturday 19 April 2014

Debugger Shortcut Keys [AX 2012]

Command name
Shortcut keys
Description
Copy
CRTL+C
Copies selected text to the Clipboard
Print
CRTL+P
Prints the contents of the code window
Select all
CRTL+A
Selects all content
Close
CRTL+F4
Closes the active window
Close all
CRTL+SHIFT+F4
Closes all windows
Next window
CRTL+F6
Switches to the next window
Previous window
CRTL+SHIFT+F6
Switches to the previous window

Command name
Shortcut keys
Description
List Breakpoints
CTRL+ALT+B
Activates the Breakpoints window
Enable Breakpoint
CTRL+F9
Enables or disables a breakpoint
Disable all Breakpoints
CTRL+SHIFT+F9
Clears all breakpoints
Toggle Breakpoint
F9
Inserts or clears a breakpoint
Local Variables
CTRL+ALT+V
Activates the Variables window
Show Output Window
CTRL+ALT+O
Activates the Output window
Show Call Stack Window
CTRL+ALT+C
Activates the Call Stack window
Show Watch Window
CTRL+ALT+W
Activates the Watch window
Run to Cursor
CTRL+F10
In break mode, resumes executing code from the current statement to the selected statement (cursor location)
Set Next Statement
CTRL+SHIFT+F10
Sets the execution point to the line of code a developer has chosen
Show Next Statement
ALT+* (asterisk on the numeric keypad)
Move the cursor to the line of the next statement to be executed
Start
F5
Changes the break mode to continue executing code
Step Into
F11
Executes code one statement at a time, following execution into function calls
Step Out
SHIFT+F11
Executes the remaining lines of the function that the current execution point lies in
Step Over
F10
Executes the next line of code, but does not follow execution through any function call
Stop Debugging
SHIFT+F5
Stops debugging

Command name
Shortcut keys
Description
Find
CTRL+F
Searches text in code window
Find Next
F3
Finds the next occurrence of the text being searched for

Saturday 12 April 2014

Using the Microsoft Dynamics AX Debugger

When a debugging session begins, the Microsoft Dynamics AX Debugger is automatically started by either the Microsoft Dynamics AX Client or the Microsoft Dynamics AX Business Connector, if the debugger has been enabled. For more information about enabling the debugger, see Enabling the Debugger.
All information shown in the debugger is retrieved directly from the client or the Business Connector. The debugger has no connection to the database, the application, or the Application Object Server (AOS).
When you want to debug X++ code, you must first set a breakpoint in the source code by using the code editor in the client. For information about setting breakpoints, see Using Breakpoints. When the code is run and the line where a breakpoint is set has been reached, execution is suspended and the debugger is automatically started. The debugger shows the location in the source code where code execution was stopped.
You can insert, remove, enable, or disable breakpoints in both the code window and the Breakpoints Window. Breakpoints are preserved between debugging sessions.
When the code execution has been stopped at a breakpoint, you can continue, end, or single-step through the source code.
Single stepping commands are:
  • Step Into – The execution steps into the current line if it contains a function or a method call.
  • Step Over – The execution steps to the next line of code in the current function or method.
  • Step Out – The execution steps out of the current function or method.
Run to Cursor executes code until it reaches the location of the cursor in the code window. Conceptually, it is similar to a temporary breakpoint.
Show Next Statement displays the location of the current execution point. The feature is helpful when you have been browsing in other source code windows in the debugger, and the location of the current execution point is not obvious.
Set Next Statement allows the user to choose which line of code is run next. This is denoted by the yellow arrow in the gutter. Choosing which line of code runs next can be done only inside the uppermost method on the call stack.
There are three ways to use this functionality:
  • Position the cursor on the line that you want to set as the current statement, and on the Debug menu, click Set Next Statement.
  • Right-click the line that you want to be the current statement, and on the shortcut menu, click Set Next Statement.
  • Drag the yellow arrow in the gutter of the code window to the line that you want to set as current. A blinking red arrow indicates the line that is the current target of the Set Next Statement action.
You can use Set Next Statement only on lines with executable X++ statements on them—blank lines, lines with only braces or semicolons, and variable declarations are not valid targets.
Shortcut menu items for copying the contents of a debugger window to the Clipboard have been added. You can choose Copy Selected Line(s) or Copy All Lines. The Call Stack, Variables, and Watch windows have this capability. Additionally, in the Variables window you can copy only the Value column by pressing CTRL+C with one or more rows selected. The Copy Selected Lines action executes.
When a row is copied, the text is placed on the Clipboard in the following formats:
  • Variable window format and Watch window format:
<Name text padded to 50 characters with spaces><tab><Value text><tab><Type text><new line>
If the Name text is longer than 50 characters, it is truncated. If the Value text is longer than 2,048 characters, it is also truncated. In the Variables window, the text of the Value column is not truncated if the user chooses Copy Selected Value.
  • Call Stack window format:
<[S] or [C]><4 spaces><Path text padded to 100 characters with spaces><tab><line number><new line>
The [S] and [C] represent whether the code is running on the server or on the client.



Using Breakpoints
In the Microsoft Dynamics AX Debugger, breakpoints allow you to suspend code execution where and when you need to. This allows you to run code until it comes to a breakpoint rather than traversing through the code, line-by-line. A breakpoint does not terminate the code execution, but instead suspends it. When the debugger has reached a breakpoint and the code execution is suspended, the debugger is said to be in break mode.
Breakpoints can be set from both the debugger and the code editor in the client. The effect of a breakpoint is similar to a Stop statement in Microsoft Visual Basic.
Breakpoints are persisted on a per-user basis. For example, if a breakpoint is inserted by user 1, user 2 cannot see the breakpoints that user 1 has set. This is true regardless of where the code with the breakpoint is running.
You can set breakpoints in the debugger and in the code editor.
To set a breakpoint:
  1. Position the cursor where you want to insert the breakpoint.
  2. Click the Insert/Remove Breakpoint icon on the debugger toolbar, or press F9.
When a breakpoint is inserted, in the code editor, the entire line changes color to indicate that there is a breakpoint in the line. In the debugger, a red dot appears in the gutter to the left of the line.
NoteNote
Setting breakpoints can be performed only on lines with executable X++ statements on them. Blank lines, lines with only braces or semicolons, and variable declarations are not valid lines for setting breakpoints.
  • To see a list of breakpoints from the Microsoft Dynamics AX client, click Breakpoints on the Edit menu, or press SHIFT+F9. In the debugger, the breakpoints are listed in the Breakpoints window.
  • To enable or disable a breakpoint, press CTRL+F9, or click the Enable/Disable Breakpoint icon on the debugger toolbar. Disabling a breakpoint is an alternative to removing one. Disabling makes the breakpoint inactive, but it remains in the list of existing breakpoints. There is no need to remove a breakpoint if it might be needed later.
  • To insert or remove a breakpoint, you can press F9, click the Insert/Remove Breakpoint icon on the debugger toolbar, or right-click in the gray margin in the Output window and click Insert or Remove. Breakpoints can also be removed from the Breakpoints window by right-clicking and then clicking Remove Breakpoint.


Saturday 5 April 2014

Debugger AX 2009

The Microsoft Dynamics AX debugger is a tool that communicates with the Microsoft Dynamics AX Client or the Microsoft Dynamics AX Business Connector.
Use this debugger to debug X++ code that is running on the following:
·         Microsoft Dynamics AX Business Connector
·         AOS
·         Microsoft Dynamics AX Client
Debugging X++ code in the Business Connector is similar to debugging code that is running on the client. The only difference between debugging on the Business Connector and debugging on the client is that the Business Connector has no client window. The client must be used to set the initial breakpoints.

How to: Enable the Debugger
Enable the debugger according to where the code is being executed on a client, a server, or the Microsoft Dynamics AX Business Connector.
Enabling the debugger on the Microsoft Dynamics AX client allows you to debug code that is run on the client. You must first enable the debugger on the client before you enable it on either Business Connector or Application Object Server (AOS).
  • On the Tools menu, click Options.
NoteNote
The debugger can be related to only one instance of Microsoft Dynamics AX at a time. When you simultaneously debug code on two different clients on the same computer, two instances of the debugger are started.
Enable the debugger to debug code that is run by Business Connector.
  1. Enable the debugger on the client, as shown in the previous step.
  2. Open the Microsoft Dynamics AX Configuration Utility. This is a stand-alone utility that manages client configurations:
    1. Click Control Panel, double-click Administrative Tools, and then double-click Microsoft Dynamics AX Configuration Utility.
  3. On the Developer tab, select the check boxes in the Settings area, as appropriate.



Enable the debugger to debug code that is run by AOS.

  1. Enable the debugger on the client as shown in the previous set of steps.
  2. On the computer that hosts AOS, open the Microsoft Dynamics AX Server Configuration Utility, which is a stand-alone utility that manages server configurations but not client configurations:
    1. Click Control Panel, double-click Administrative Tools, and then double-click Microsoft Dynamics AX Server Configuration Utility.
  3. On the Application Object Server tab, select the check box labeled Enable breakpoints to debug X++ code running on this server.