Hi, Readers.
Today I would like to talk about how to use a query to make a query searchable (Add Query to Tell me) in Business Central.
The Business Central client includes the Tell me feature that lets users find objects by entering search terms. Use the Search icon to search for it. You can also use ALT+Q to start a search.
When you add a query in your extension, you most likely want it to be discoverable to users in Tell me. But this was not possible in previous versions. We can only use the QueryCategory Property to run the query from the page, or add it to an action. For example,
More details: Dynamics 365 Business Central: QueryCategory property – Smartlist? (Execute Queries from Pages)
Now in AL, you can make a query searchable from Tell me by setting the UsageCategory property in code. Just like Page and Report. Here is a simple example.
After being searchable, it also supports adding queries to Bookmarks.
So if the UsageCategory is set to None, or if you don’t specify UsageCategory:
- The query won’t show up when you use the search functionality.
- Users won’t be able to bookmark a link to the query object from the user interface.
Very simple. Give it a try!!!😁
PS:
1. It does not have to be set to ReportsAndAnalysis, other usage categories are also fine.
Value | Description |
---|---|
None | The page or report isn’t included in search. |
Lists | The page or report is listed as Lists under the Pages and Tasks category. |
Tasks | The page or report is listed as Tasks under the Pages and Tasks category. |
ReportsAndAnalysis | The page or report is listed as Reports and Analysis under the Reports and Analysis category. |
Documents | The page or report is listed as Documents under the Reports and Analysis category. |
History | The page or report is listed as Archive under the Reports and Analysis category. |
Administration | The page or report is listed as Administration under the Pages and Tasks category. |
2. Because Query does not support extensions, it is not possible to make a standard Query searchable.
3. The AdditionalSearchTerms property is not supported.
4. Sorry I haven’t tested it in detail, but according to Microsoft, it is available since BC23.1. More details: Business Central 2023 wave 2 (BC23): Provide queries for users to do ad hoc data analysis across tables
END
Hope this will help.
Thanks for reading.
ZHU
コメント