我有一个场景,在订单表单中有一个发票计划子网格。当发票计划子网格在停用特定时重新加载时,我需要刷新/重新加载主表单记录在子网格中。
附注:此方案适用于 Dynamics 365 CRM 统一接口(interface) (UCI)。我已经尝试了所有三个子网格事件,但在这种情况下没有帮助。
最佳答案
您必须附加一个自定义事件处理程序来处理此问题。 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);
}
关于javascript - 在 Dynamics 365 CRM 统一接口(interface)中重新加载/刷新子网格时重新加载表单,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59929848/