How to: Create a Query for Search
Applies To: Microsoft Dynamics AX 2012 R3, Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012
To allow a table to be searched, you must create a query that is used to crawl the table data.
Creating a Query for Search
You must create a query that provides access to the table you want to search. We recommend that you make a new query that is used only for search.
To create a query for search
In the AOT, expand the Queries node.
Right-click the Queries node and then click New Query.
Right-click the new query and then click Properties.
Rename the query by modifying the Name property. We suggest using a name that indicates the query is to be used for search. For example, the query to search work orders in the Facility Management sample is named FCMWorkOrdersSearch.
Set the Title property for the query to the name that identifies the type of data that will be returned from the search.
Set the Searchable property to Yes.
Save the changes in the AOT.
Adding a Data Source to a Query
To add a data source to a query
In the AOT, expand the Queries node.
Expand the node for the query that you are using for search.
Right-click the Data Sources node and then click New Data Source.
Right-click the new data source and then click Properties.
Rename the data source by modifying the Name property. Use a name that indicates the table you are using for the data source.
Set the Table property to indicate the table that you want to search.
Expand the new data source and select the Fields node.
Set the Dynamic property to Yes.
Save the changes in the AOT.
Before you can use the new search query, you must restart the services that are used for search. See Restarting Services for Search for more information.
Announcements: New book: "Inside Microsoft Dynamics AX 2012 R3" now available. Get your copy at the MS Press Store.