setDefaultView (Client API reference)
Sets the default view for the lookup control dialog box.
Control types supported
Lookup
Syntax
formContext.getControl(arg).setDefaultView(viewId);
Parameter
Name | Type | Required | Description |
---|---|---|---|
viewId |
String | Yes | The ID of the view to be set as the default view. |
Example
This setDefaultViewSample function will set the account form primary contact lookup default view to the My Active Contacts view.
function setDefaultViewSample(executionContext) {
var formContext = executionContext.getFormContext();
formContext.getControl("primarycontactid").setDefaultView("{00000000-0000-0000-00AA-000010001003}");
}
Related articles
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈