gpt4 book ai didi

javascript - 动态 CRM 2011 : Disable pop-up that comes after Xrm. Page.ui.close();

转载 作者:行者123 更新时间:2023-11-28 20:10:07 24 4
gpt4 key购买 nike

如何禁用调用 Xrm.Page.ui.close() 后出现的弹出窗口(“此窗口中有未保存的更改...”)?

我在 Xrm.Page.data.entity.save() 之后直接调用此函数,以便在关闭表单之前保存所有字段。

setSubmitMode("never") 的解决方案不起作用:

var attributes = Xrm.Page.data.entity.attributes.get();
for ( var i in attributes){
attributes[i].setSubmitMode("never");
}
Xrm.Page.ui.close();

最佳答案

您可以使用saveandclose参数:

Xrm.Page.data.entity.save("saveandclose");

来自 MSDN :

save("saveandclose")

Save and Close button in the ribbon. This is the equivalent of the user clicking the Save and Close button in the ribbon.

关于javascript - 动态 CRM 2011 : Disable pop-up that comes after Xrm. Page.ui.close();,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20032167/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com