简体   繁体   English

CRM 2013刷新子网格

[英]CRM 2013 Refresh Subgrid

I have a javascript that adds a N:N relationship between two CRM entities via a ribbon function. 我有一个JavaScript,可以通过功能区函数在两个CRM实体之间添加N:N关系。 Everything works fine, the relationship gets added. 一切正常,关系被添加。 However I'm having problems refreshing the subgrid that contains the added entity records. 但是,我在刷新包含添加的实体记录的子网格时遇到问题。 Before this function used to work in CRM 2011, but not anymore in 2013. 在此功能之前,它只能在CRM 2011中使用,但在2013年不再可用。

This used to work in CRM 2011 to refresh "MySubGrid" after a record is added. 这曾在CRM 2011中用于添加记录后刷新“ MySubGrid”的工作。

var gridControl = Xrm.Page.ui.controls.get("MySubGrid");
if (gridControl != null) {
gridControl.refresh();}

I tried below as suggested from a blog and it didn't work either: 我按照博客的建议尝试了以下操作,但该方法也无效:

var propertyStatusControl = document.getElementById("Propertiestatus");
        if (propertyStatusControl != null) {
            propertyStatusControl.refresh();}

Any suggestions? 有什么建议么? Thanks in advance for the help. 先谢谢您的帮助。

Can you try as follows, 您可以尝试以下方法吗?

var propertyStatusControl = document.getElementById("Propertiestatus");
if (propertyStatusControl != null) {
propertyStatusControl.**control**.refresh();}

Hope this helps. 希望这可以帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM