Dynamics CRM 刷新RibbonButton

最近项目中遇到这样的一个情况,ribbonButton会根据当前页面的字段操作来判断是否可用。通常情况是当操作完字段值 并点击保存页面会刷新重新加载,ribbonButton会基于字段值来判断是否可用。

但是在测试时,测试人员希望在操作完字段未点击Save按钮之前就控制ribbonButton是否可用。

以下给出解决方案:

refreshRibbon (Client API reference)

 

Applies to Dynamics 365 for Customer Engagement apps version 9.x

Causes the ribbon to re-evaluate data that controls what is displayed in it.

Syntax

formContext.ui.refreshRibbon(refreshAll);

Parameter

NameTypeRequiredDescription
refreshAllBooleanNoIndicates 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 typically used when a ribbon (RibbonDiffXml) depends on a value in the form. After your code changes a value that is used by a rule, use this method to force the ribbon to re-evaluate the data in the form so that the rule can be applied.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值