我需要在JS函数运行时冻结/禁用Ribbon WorkBench按钮(以防止它单击并运行js逻辑两次)。我试图谷歌查找信息,但有很多例子,如何禁用简单的表单标题元素,但没有功能区WorkBench。
发布于 2020-04-16 21:21:39
我建议你使用showProgressIndicator和closeProgressIndicator来展示Progress模式来发布它。这将冻结整个表单。
function getPrimaryContactEmail()
{
Xrm.Utility.showProgressIndicator("Loading contact email..");
var contact = Xrm.Page.getAttribute("primarycontactid").getValue();
if(contact == null){
Xrm.Utility.closeProgressIndicator();
return;
}
Xrm.WebApi.retrieveRecord("contact", contact[0].id, "$select=emailaddress1")
.then(function(result) {
var email = result["emailaddress1"];
Xrm.Utility.closeProgressIndicator();
})
.fail(function(error) {
Xrm.Utility.closeProgressIndicator();
var message = error.message;
});
}https://stackoverflow.com/questions/61245622
复制相似问题