Custom View not executing on change of another Lookup valuesin MSCRM 2011
-
21 Maret 2012 12:03
I tried adding Custom View for custom entities . It worked fine on page load . But when i changed one of the lookup then other dependent lookup didn't populate values as expecte . I used below url
http://msdn.microsoft.com/en-us/library/gg334266.aspx#BKMK_addCustomView
i am getting ajax onreadystate = = 4 when page loads for the Custom view . But when i change one lookup then ajax onreadystate is 1 or 3. I don't now why i am not able to get onreadtstate == 4 for lookup change .
Abhishek
- Jenis yang Diubah Abhisinha17 21 Maret 2012 12:05
Semua Balasan
-
02 April 2012 11:49
Hi,
You can use following javascript to add Custom View to lookup Control.
AddCustomViewToLookupControl("lookupControlname", null, "entityName", "Custom Filtered Lookup", fetchXml, layoutXml);
function AddCustomViewToLookupControl(lookupControlname, viewId, entityName, viewDisplayName, fetchXml, layoutXml)
{
if (lookupControlname != null && Xrm.Page.getControl(lookupControlname) != null) {
var lookupControl = Xrm.Page.getControl(lookupControlname);
viewId = viewId != null ? viewId : "{C7034F4F-6F92-4DD7-BD9D-9B9C1E996381}";
viewDisplayName = viewDisplayName != null ? viewDisplayName : "Custom View";
lookupControl.addCustomView(viewId, entityName, viewDisplayName, fetchXml, layoutXml, true);
}
}Hope it helps,
Regards,
Yusuf
- Diedit oleh Mohammad Yusuf Ansari 02 April 2012 11:51
- Disarankan sebagai Jawaban oleh Mohammad Yusuf Ansari 02 April 2012 11:51