Posts

Showing posts from October, 2011

Primary key, Primary Index and Clustured Index,,,,

There are two main types of indexes that we can have on a Microsoft SQL Server backend Database. These are normal and clustered indexes. Normal index can be viewed as the index in the back of a book. We first look in the index for a topic. After finding the topic in alphabetical order we also find the page number or address of the topic in the book. We then use the address to easily find the topic. If we did not have this index we would have to search sequentially through the book and the larger the book the greater the effort and time to either find a topic or realize that it does not exist. This is similar to a normal index in the database where we have the data stored in one file and the index stored in another file in the order specified. The database engine using the index will first look in the index file then retrieve the address of the record that is used to locate the record in the data file. For clustered index the records in the data file are sorted in the order of the

Events on FORMS:

Opening a form: sequence of events When you open a form the following sequence of events occurs: 1. The new constructor on the form is activated. 2. The init method on the form is activated. 3. The init method on the form data source is activated. 4. The run method on the form is activated. 5. The executeQuery method on the form data source is activated. 6. The firstField method on the form is activated. Closing a form: sequence of events When you close a form by clicking a Cancel button, the following sequence of events occurs: 1. The closeCancel method on the form is activated. 2. The canClose method on the form is activated. 3. The close method on the form is activated. When a form is closed with CloseCancel, user modifications are not saved. When you close a form by clicking the close button ( ) or an OK button, the following sequence of events occurs: 1. If the form is closed with an OK button, the closeOK method on the form is executed. closeOK is not activ

close methods on a form

There are “only” 5 ways to close a form: 1. Close - close the form 2. CloseOK – close the form, and set the OK flag – called by the commandbutton: Ok 3. CloseCancel – close the form, and set the Cancel flag – called by the commandbutton: Cancel 4. CloseSelectRecord – close the lookup form, and set return record 5. CloseSelect – close the lookup form, and set return value The methods in past-tense are used to determine if or how a form was closed: 6. Closed – The form is no longer open 7. ClosedOK – The form was closed by the user clicking ‘OK’ 8. ClosedCancel – The form was closed by the user clicking ‘Cancel’ And canClose() is called before any of the close methods get called.

RunOn property in Axapta

The class has a RunOn property that have three values: Client, Called From and Server. Objects created from the class will then live at the location specified. If you choose Called from, the object will live at the tier where the code creating it (by calling the new constructor) is running. Classes extending other classes will also inherit the RunOn property. You cannot change it if it is Client or Server. If it is Called from, you can leave it or change it to Client or Server. But someone may wonder that menu items have their RunOn properties, what will happen if the RunOn property of a given menu item pointing to a class is set to Server, whereas the class's RunOn property is set to Client. The answer is that only if the Class's RunOn property is set to Called From, the objects will be created determined by menu item's RunOn property. Also there is another situation, the class has static main method which has a RunOn property as well. What will happen if the menu ite

Install Dynamics AX 2009 Reporting Extensions with SQL server 2008..

Sometime back, I have experience on interesting issue while installing Reporting Extensions with SQL server 2008, When I run the Setup, I get the following message : "You must install SQL server 2005 Reporting Services Service Pack 2 before installing the report extensions". Here is the workaround 1. Locate the Dynamics AX 2009 Reporting services dll from the extracted AX 2009 SP1 folder[\\AX2009SP1\support\axsetupresources\microsoft.dynamics.setup.reportingservices.dll;File Version - 5.0.1000.52] Extract the AX 2009 .iso to a folder Copy the microsoft.dynamics.setup.reportingservices.dll into the folder:  \\DynamicsAX\Msi\Components32\Program Files\Microsoft Dynamics AX\50 and Setup \\DynamicsAX\Msi\Components64\Program  Files\Microsoft Dynamics AX\50\Setup It will ask to replace the existing dll having File Version - 5.0.593.0. Say Yes and replace. 5. Then Install AX Reporting Services extensions. It works fine and the Reporting Extensions are installed nice.

Error executing code: Wrong argument types for comparison.

ERROR: Error executing code: Wrong argument types for comparison. Stack trace: (C) \Classes\QueryRun\next (C) \Classes\FormDataSource\executeQuery (C) \Forms\MyForm\Data Sources\MyFormDatasource\Methods\executeQuery - line 4 (C) \Classes\FormDataSource\linkActive (C) \Forms\MyForm\Data Sources\MyFormDatasource\Methods\linkActive - line 3 SOLUTION: on the form init, public void init() { super(); this.query().dataSourceNo(1).clearDynalinks(); }

AX Client Cannot Connect to AOS

This may be a simple one for some of you, but these are the common things to look out for when installing clients so that they will connect to the AOS: 1.         Ensure the port you are trying to connect to is open on the Internal Firewall. Default is 2712. This can be changed in the AOS however, so ensure whatever port that is, that it is open for the client to access 2.         When creating a config file from the server that is a 64bit computer, it points the folders to “Program Files (x86)”. If you are importing that AXC into the client, ensure that you change the folder pointers to “Program Files” first, before importing it. 3.         Ensure that you have matching Service Packs installed on both client, AOS and Application

Basics of setting up AX2009 security keys

Basics of setting up AX2009 security keys Set up alerts a. Go to Basic > Number Sequence > Reference > System ID i. Ensure that the Basic_01 number sequence exists. If not, create. b. Set up Basic > Setup > Email Templates c. Basic > Setup > Alerts > Set up email ID d. Administration > Batch Groups i. Create "Alerts" Batch Group e. Administration > Setup > Server Configuration i. Tick Is Batch Server ii. On Batch server groups tab, select "Alerts" f. Basic > Setup > Alerts > Manage alert rules g. Basic > Setup > Alerts > Periodic > Alerts > Change based alerts i. Add to "Alerts" batch group and send to batch h. Basic > Setup > Alerts > Periodic > Alerts > Due date alerts i. Add to "Alerts" batch group and send to batch i. Administration > Common forms > Users > User options i. Set up email ii. On Notifications tab, set up parameters iii. On Status

create a copy of a Dynamics AX 2009 live company on a test server.

In order to create a copy of Live company on a test server for Dynamics AX 2009, there are two scenarios. Scenario 1: Copy the entire environment This is a relatively easy scenario as explained in below steps 1. Copy over the Dynamics AX SQL Database and restore on the other SQL server 2. Copy over the application folder of Dynamics AX and paste it in Application folder content. (Default location is C:\Program Files\Microsoft Dynamics AX\50\Application\Appl). 3. Now point AOS to the newly copied application folder. Scenario 2: Only data to be copied to the test environment 1. Follow the step as 1 above and in this scenario there is no need to copy the Application folder. 2. Run Synchronize so that the database structure matches the application files on the test server.