Quantcast
Channel: CRM Development Forum
Viewing all articles
Browse latest Browse all 888

Not able to get Associated View grid control in JavaScript

$
0
0

My Account form is having “Contacts” navigation link in the left side panel, After user clicks on “Contacts” it gets loaded “Contacts Associated View”.

My requirement is after user creates new Contact, I need to refresh my associated view in account form. We have N to N relationship between Account and Contact, after I create contact I am calling plugin to associated contact record to Account in (N:N relationship) chs_contact_account.

I want to call grid fresh event in my form load, for some reason I am not able to get grid control, I tried all the possible options to get “Contacts Associated View” grid control.

functionRefreshContactsGrid(object)

{

     //var gridControl = Xrm.Page.getControl('crmGrid_chs_contact_account');

     //var gridControl = document.getElementById('crmGrid_chs_contact_account').control;

     //var gridControl = Xrm.Page.ui.controls.get("crmGrid_chs_contact_account");

     //if (gridControl != null)

     //{

           //gridControl.refresh();

     //}  

}

Please let me know if there is any way I can get customer grid control in JavaScript?


Viewing all articles
Browse latest Browse all 888

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>