Hi, Readers.
The public preview for Dynamics 365 Business Central 2026 release wave 1 (BC28) is available. Learn more: Link.
I will continue to test and share some new features that I hope will be helpful. In this post, I would like to talk about AL developers can use semantic search on data and metadata.
AL developers can use semantic search on data and metadata:
In this release wave, we make it possible for AL developers to get access to the semantic ranking of (virtual metadata provider) records from the AL language.
Effectively this means that a developer can run a query like: TOP n by similarity to “search term”.
The semantic data (and metadata) search is available from the new codeunit “Semantic Data Search” with methods such as
https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/whatsnew/preview-feature-details?wt.mc_id=DX-MVP-5004336#al-developers-can-use-semantic-search-on-data-and-metadata
- SetMaxResults
- SetSearchTarget(RecRef)
- FindSimilarByField(SearchString, FieldIds, Rec)
I conducted a quick investigation and found that Microsoft has introduced the following new Codeunit in this version:
codeunit 2000000025 “Semantic Search”: Provides functionality to perform semantic searches on both metadata objects and data records, retrieving ranked results based on similarity scoring.
This includes three methods.
procedure SetMaxResults(MaxResults: Integer): Sets the maximum number of results to return from a search.
procedure SetSearchTarget(Record: RecordRef): Sets the target to search. Any filters set on the record will be applied to the search.
FindSimilarByField(): Performs a semantic (similarity) search for the specified text on a specified list of fields and populates the provided result table with the search results.
Unfortunately, the Scope attribute is currently set to OnPrem. This means it cannot be used in the cloud version and is restricted to on-premises environments or Microsoft’s standard features. For example,
The application object or method ‘FindSimilarByField’ has scope ‘OnPrem’ and cannot be used for ‘Extension’ development. AL AL0296
I will check this again when the On-Premises version of v28.0 is released next month. I also hope that Microsoft will consider lifting these ‘OnPrem’ scope restrictions in the near future.
END
Hope this will help.
Thanks for reading.
ZHU
コメント