在Dynamics 365 CRM统一界面中重新加载/刷新子网格时重新加载表单 [英] Reload Form on reload/refresh of subgrid in Dynamics 365 CRM Unified Interface
本文介绍了在Dynamics 365 CRM统一界面中重新加载/刷新子网格时重新加载表单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一种情况,在订单表格中有一个发票计划子网格.在特定的 停用 上重新加载了 Invoice Schedule Sub-grid 时,我需要刷新/重新加载 Main Form .记录在子网格中.
I have a scenario where in Orders Form there is a Invoice Schedule Sub-grid. I need to Refresh/Reload the Main Form when the Invoice Schedule Sub-grid is reloaded on Deactivating a particular record in the Sub-grid.
PS::此方案适用于Dynamics 365 CRM统一界面(UCI).我已经尝试了所有三个Sub-grid事件,但在这种情况下无济于事.
P.S: This scenario is for Dynamics 365 CRM Unified Interface (UCI). I have tried all the three Sub-grid events but does not help in this scenario.
推荐答案
您必须附加一个自定义事件处理程序来处理此问题.了解详情
You have to attach a custom event handler to deal this. Read more
var globalFormContext;
function myFormOnload(executionContext) {
globalFormContext = executionContext.getFormContext();
addSubgridEventListener();
}
function addSubgridEventListener(){
var gridContext = globalFormContext.getControl("<your_subgrid_name>");
//ensure that the subgrid is ready…if not wait and call this function again
if (gridContext == null){
setTimeout(function () { addSubgridEventListener(); }, 500);
return;
}
//bind the event listener when the subgrid is ready
gridContext.addOnLoad(subgridEventListener);
}
function subgridEventListener(context){
globalFormContext.data.refresh(false);
}
这篇关于在Dynamics 365 CRM统一界面中重新加载/刷新子网格时重新加载表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文