ui.refreshRibbon (Client API reference)
Causes the ribbon to re-evaluate data that controls what is displayed in it.
Syntax
formContext.ui.refreshRibbon(refreshAll);
Parameter
Name | Type | Required | Description |
---|---|---|---|
refreshAll |
Boolean | No | Indicates whether all the ribbon command bars on the current page are refreshed. If you specify false, only the page-level ribbon command bar is refreshed. If you do not specify this parameter, by default false is passed. |
Remarks
This function is used when a ribbon action JavaScriptFunction
(RibbonDiffXml) changes the data in the form. For example, changing of state of the record via a ribbon action. After your code changes the data that is used by a rule, use this method to force the ribbon to reevaluate the data in the form so that the rule can be reapplied.
Guidance
For optimal performance of your form loads, you should not use this function in EnableRule
(RibbonDiffXml) or onLoad
(FormXml). The form load itself triggers rules evaluation of all the ribbon actions. In case, if you want to control the visibility of a ribbon action, use promises and asynchronous pattern in EnableRule
.
Related articles
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈