各个模块的刷新js

 1 // 更新页面中的subgrid
 2 function refreshSubGrid(subgridName) {
 3     Xrm.Page.ui.controls.get(subgridName).refresh();
 4     //Xrm.Page.getControl(subgridName).refresh()
 5 }
 6 
 7 // 刷新页面中的iframe
 8 function refreshIframe(iframeName) {
 9     setTimeout(function () {
10         window.parent.document.getElementById(iframeName).contentWindow.location.reload();
11     }, 200); //0.2秒后重新加载当前页面
12 }
13 
14 // 刷新整个窗体
15 function refreshForm() {
16     var entityId = Xrm.Page.data.entity.getId();
17     var entityName = Xrm.Page.data.entity.getEntityName();
18     if (entityId && entityName) {
19         setTimeout(function () {
20             Xrm.Utility.openEntityForm(entityName, entityId);
21         }, 1000); //1秒后重新加载当前页面
22     }
23 }

 

posted @ 2019-01-05 16:04  Tk、  阅读(587)  评论(0编辑  收藏  举报