renderSearchPage (JavaScript API Reference) for Dynamics 365 Channel Integration Framework 1.0
Allows you to search among the records of a particular entity type. This API opens the Unified Interface entity page with the search field on it prepopulated with the search string that is passed as a parameter.
Syntax
Microsoft.CIFramework.renderSearchPage(entityLogicalName, searchString, searchType).then(successCallback, errorCallback);
Parameters
Name | Type | Required | Description |
---|---|---|---|
entityLogicalName | String | Yes | The entity logical name of the record you want to query such as "account". |
searchString | String | Yes | String to search among the attributes of the entity records. |
searchType | Boolean | No | Type of search page to open—0 for relevance search and 1 for categorized search. If no parameter is provided, the records are searched by category. For information on relevance search, see Configure Dataverse search. |
successCallback | Function | No | A function to call when some records are retrieved. |
errorCallback | Function | No | A function to call when the operation fails. |
Return value
On success, returns a promise object containing the attributes specified earlier in the description of the successCallback parameter.
Examples
The following example shows how to query for the term "Contoso" among the records of an account entity by specifying the relevance search type.
var entityname = "account"
var searchterm = "Contoso"
var searchtype = 0 // relevance search
Microsoft.CIFramework.renderSearchPage(entityname, searchterm, searchtype).then(
function (success) {
console.log(success);
},
function (error) {
console.log(error);
}
);
The following example shows how to query for the term "Contoso" among the records of an account entity, without specifying the search type.
var entityname = "account"
var searchterm = "Contoso"
Microsoft.CIFramework.renderSearchPage(entityname, searchterm).then( // if search type is not passed, it defaults to categorized search
function (success) {
console.log(success);
},
function (error) {
console.log(error);
}
);
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應