Showing posts with label full-text index. Show all posts
Showing posts with label full-text index. Show all posts

Thursday, December 29, 2011

WALKTHROUGH - Creating Fact Boxes in AX 2012 - PART III

In my last post (http://axwonders.blogspot.com/2011/12/walkthrough-creating-fact-boxes-in-ax_28.html ), we created 3 EDT’s, 4 tables and created the relationships we needed to hold the Auto Rental data.  In this short post we are going to talk about primary indexes, and then we will create one for the Eduardo_CustCarTable.  In addition, we are going to learn a little bit more about Form’s Parts in AX 2012 before jumping into creating the user interface forms for the Auto Rental data.

Indexes
For detailed information about indexes you can read the following: http://axwonders.blogspot.com/2011/11/indexes-in-microsoft-dynamics-ax.html
In a nutshell, we can say that a primary key is one or more columns that uniquely identify one record in a table from all the other records.  A primary index is a unique index for a table that defines the primary key for that table. To set an index as a unique index, set the index property Allow Duplicates to No. This is the same idea as creating a MS SQL table primary key (Check the following post for more info about this http://blog.sqlauthority.com/2008/09/08/sql-server-%E2%80%93-2008-creating-primary-key-foreign-key-and-default-constraint/).
NOTE: When a primary index is not specified, AX uses a Surrogate Key as the primary index. This key is the RecId field and, if the table is saved per company, the DataAreaId. The surrogate key is used on many relations between tables.
To set the primary index on a table, open the property sheet for the table. The PrimaryIndex property allows any unique index with a key that is mandatory and cannot be edited.

1.       In the AOT, locate the Eduardo_CustCarTable table.


2.       In the property sheet for the table, set the PrimaryIndex property on the table to RentalIdx






Parts
So, what are Parts? [From Microsoft - http://msdn.microsoft.com/en-us/library/gg844683.aspx ]A Part is a specialized type of control you use to retrieve and show a collection of data. A part specifies how to retrieve the data that appears in the FactBox pane of a form, the preview pane of a list page, or the enhanced preview of a control. You use parts to provide information related to a record that appears in a form…

…To create or modify a part, you use the properties of that part to describe how to retrieve and show data. For example, you use a part property to specify the data source for the part. Typically, you use a query as the data source for a part. You also use properties to specify the data fields that show when the part appears as a FactBox on a form.
Then a FactBox is the collection of data that appears on the form, which is based on a Part.  In addition, a FactBox always represents a single part, and if we want to modify a FactBox, we must modify the underlying part.
In AX 2012, a part is defined by using metadata and each part we create extends a common metadata model for parts. Further, one of the best advantages of the Part metadata model is that enables us to create parts that can appear in both the client and Enterprise Portal (EP).
Parts also allow us to represent data through cues in AX 2012. To show a cue in the FactBox pane of a form, you add the cue to a cue group part. A cue group is a type of part that contains one or more cues, and these can be created as a cue group that can appear in forms for both the client and EP, which can be used to add information to a role center page.
In my next and last post about this topic, we will create the user forms needed to display the Auto Rental data. In addition, we will create menu items, and of course a FactBox to display Auto Rental information related to a customer.


Take Care!

Saturday, March 19, 2011

SQL 2008R2 FULL TEXT INDEX SEARCH SETUP

In Microsoft SQL 2008 R2, the process of setting up full text search is done differently then in prior versions of SQL.


In earlier versions of SQL, we would have to right-click on the table we wanted to have full text index search capabilities by going to Design. Once in the table designer, we would choose Full Text Index and we would set the values in the window that would pop up.


In SQL 2008 R2, however, the process of setting up the full text index search is as follows:


The very first step is to create a new Catalog in our data base as follows (Let's not forget to click on the Data Base we want to setup the Full Text Index Search)


CREATE FULLTEXT CATALOG NameOfCatalog


Execute the stored procedure, which should be really quick and in where we should get a message like this:


Command(s) Completed Successfully


Then we go through the following steps: