31 Aralık 2010 Cuma

CRM 4.0 IFrame: Show Advanced Find Result View

There are many people asked about: How to show the Advanced Find result view in an IFrame? Instead of building a custom aspx page(dynamically passing parameters, see Adi's solution), I have another method to share if you don't need passing parameters into the query.

1. Build your Advanced Find query and save it, then copy the Shortcut.



2. Put a IFrame control on the Form, clear the "Restrict cross-frame scripting" checkbox.



3. Put the below code to the OnLoad() event, you need to change the IFRAME_view name and the iFrame.src (copy and paste from the step 1)



var iFrame = crmForm.all.IFRAME_view;

iFrame.src = SERVER_URL + "/advancedfind/advfind.aspx?etn=contact&QueryId=%7b3882F0FA-2B3A-DE11-BFB8-0018FE7F3A64%7d&ViewType=4230&AutoRun=True";
iFrame.attachEvent( "onreadystatechange" , Ready);

function Ready()
{
var iDoc = iFrame.contentWindow.document;
if(iDoc.getElementById("crmMenuBar") != null && iDoc.getElementById("btnBack") != null)
{
iDoc.getElementById("crmMenuBar").style.display = "none"; // hide the top menu bar
iDoc.getElementById("btnBack").style.display = "none"; // hide the bottom BACK button
}
}





non profit crm |small business crm solution |onyx crm |benefits of crm |personal crm |

Hiç yorum yok:

Yorum Gönder