Posts

Showing posts from April, 2014

AX Menu items and how to create menu item

Image
Menus Items You can use menu items to activate application objects from the user interface. Three types of menu items can be created: • Display - used for forms • Output - used for reports • Action - used for running processes Display Menu Items Are used to open objects that appear on the screen, typically forms. For example, clicking the Customers menu item in the Accounts Receivable module opens the CustTableListPage form. This Display Menu item points to the Form object CustTableListPage. There are two important Properties to notice. • Object type = Form • Object = CustTableListPage   How to: Create a Menu Item Task: To create a menu item to open the AJ_BookTypeForm To understand the example scenario - Go here 1. Open the AOT, expand the Menu Items node. 2. Open a second AOT and locate the AJ_BookTypeForm 3. Drag the AJ_BookTypeForm form to the Display node of the Menu Items node. A new display menu item is created. 4. In the properties shee...

How to: Create a Form

Image
To create a form that will be used to view, create and edit records in the AJ_BookTypeTable. 1. In the AOT, right-click the Forms node and select New Form. 2. Rename the form to AJ_BookTypeForm. 3. In a second AOT, locate the table AJ_BookTypeTable. 4. Drag the table AJ_BookTypeTable to the DataSources node on the AJ_BookTypeForm 5. Expand the Designs node on the AJ_BookTypeForm. 6. Right-click the Designs node and select New Control > Grid. A new Grid control is created. 7. Expand the DataSources > AJ_BookTypeForm > Fields node. 8. Drag the fields AJ_BookTypeID and Name to the grid control. 9. On the properties sheet for the Design node, in the Caption property, enter "Type of books". 10. Save your changes to the form. To understand the example scenario - Go here  

How to: Create a Relation

Image
Use this step procedure to create a relation between the AJ_SubGenreTable and the AJ_BookTypeTable. The Sub-genre is related to the BookType table. For example, the Sub-Genre 'Poems' can be only related to the record "Poetry" in the AJ_BookTypeTable table. You should not be able to have a "Novels" as Sub-genre for "Poetry". To understand the example scenario - Gohere To understand more details about types of relations: Gohere . 1. In the AOT, locate the AJ_EDTBookTypeID EDT. 2. Right-click the AJ_EDTBookTypeID EDT and select Properties. 3. In the ReferenceTable property enter AJ_BookTypeTable. 4. Close the properties sheet. 5. Expand the AJ_EDTBookTypeID node. 6. Right-click the Table References node and select New > Table Reference. A new table reference is created. 7. Right-click the AJ_BookTypeTable Table Reference and select properties. 8. In the related field property, enter AJ_BookTypeID 9. Close the property sheet...

What are AX Table relations?

Relations between tables are used to: * Associate rows in one table to rows in another table. • Enforce business rules across tables • Create auto joins in forms (join one table to another table). • Look up values in other tables (using lookups and the View Details command). • Validate data by providing constraints • Automatically propagate changes from one table to another by defining cascading relations. • Generating field help (hover over a field, and data from the related table is displayed). Relationships can be created between tables using MorphX • These relations are defined within the Microsoft Dynamics AX application and not at the physical database level. • Relations govern the relationships between data in different tables such as foreign key relationships. • Foreign key relationships between tables are always formed from the parent table. Under the relations node you can create different types of relationships between the parent table and ot...

How to: Create an Index and set it as primary

Image
How to: Create an Index Use the following procedure to create a new index on the AJ_BookTypeID field on the AJ_BookTypeTable NOTE: A field of data type memo or container cannot be used in an index. To understand the example scenario - Go here 1. Locate the AJ_BookTypeTable table in the AOT. 2. Right-click the Indexes node in the table and select New Index. A new index Index1 is created. 3. Rename the index to AJ_BookTypeIDIdx 4. Drag the field AJ_BookTypeID to the index AJ_BookTypeIDIdx node. 5. In the properties sheet for the AJ_BookTypeIDIdx node, set the property AllowDuplicates to No. How to: Set a Primary Index Use the following procedure to set the index created in the previous procedure to be a primary index. 1. In the AOT, locate the AJ_BookTypeTable table. 2. In the property sheet for the table, set the PrimaryIndex property on the table to AJ_BookTypeIDIdx 3. Close the property sheet for the table.  

How to: Create a New Table

Image
Use the following step procedure to create a new table that will store the records for the BookType. There are two fields on the table called BookTypeID (type AJ_EDTBookTypeID), and Name (type Name). To understand the example scenario - Go here 1. Open a new development workspace. 2. In the AOT, expand the Data Dictionary node. 3. Right-click the Tables node and select New Table. A new Table called Table1 is created. 4. Right-click Table1 and select Properties. 5. Modify the property Name to AJ_BookTypeTable 6. Modify the property Label to "Types of Books" 7. Close the property sheet. 8. Press Ctrl-D to open another AOT. Ensure window is not maximized by clicking the restore down button to enable you to view both AOT windows. 9. Expand the Data Dictionary node. 10. Expand the Extended Data Types node. 11. Locate the AJ_EDTBookTypeID EDT. 12. Drag the AJ_EDTBookTypeID EDT to the Fields node of the AJ_BookTypeTable table. A new field called AJ_E...

How to: Create a New Extended Data Type

Image
Use the following procedure to create a new EDT that will define how the Id of the BookType is stored. To understand the example scenario - Go here 1. Open a new development workspace. 2. In the AOT, expand the Data Dictionary node. 3. Right-click the Extended Data Types node. 4. Select New > String. A new EDT called Type1 is created. 5. Right-click Type1 and select Properties. 6. Modify the property Name to AJ_EDTBookTypeID. 7. Modify the property Extends to SysGroup. 8. Modify the property Label to “Type of Book”. 9. Close the property sheet and click Save in the AOT to save your changes. 10. On the Database Synchronization dialog, click Yes. This will take a few minutes to complete.

How to: Create a New Model and Development Project

Image
Example Scenario: Let’s try out to learn more by building up an example scenario from scratch. We shall have step-by-step procedures to demonstrate how to create a various levels of modification that can be used in Maintenance of Library. The procedure will need to keep track of each book that is borrowed, the readers who borrow, the Book type, the SubGenre of the book and details of each visit to library including the date, reason and the cost. To do this you will need to create the following new tables. • BookType table: This will contain entries such as Fact information, Current affairs, Non-fiction, Fiction, and so on. • SubGenre table: This will contain the info about various sub-genres a book can have based on the book type. Would have entries like Novels, Biographies, Poems and so on. This should be related to the BookType Table. • BookLendtable: This information is related to the customer table and BookType table. • Visit transactions: This will contain the details ...