CRM 2013 Open Advanced Find from Anywhere with Bookmarklet

Paul Nieuwelaar, 24 July 2014

In a previous blog post of mine I explained how to add Advanced Find onto the Form Command Bar in CRM 2013, since the list view no longer stays open while on forms like they did in 2011, it can be difficult getting to advanced find sometimes.

In this blog post I will be taking the code from that blog post and converting the button into a browser bookmarklet so that we can launch advanced find from anywhere in CRM, including forms, views, dashboards, and solutions.

Just like the command bar button, this bookmarklet will automatically open advanced find to the entity you’re on if coming from a form or view, otherwise it will display the first entity by default.

The script for the bookmark is as follows:

javascript: var frame = $("iframe").filter(function () { return ($(this).css('visibility') == 'visible') }); var form = frame[0].contentWindow; var u = form.Mscrm.CrmUri.create("/main.aspx"); u.get_query()["pagetype"] = "advancedfind"; try { var etc = form.Xrm.Page.context.getQueryStringParameters().etc; } catch (e) { } if (etc) { u.get_query()["extraqs"] = "EntityCode=" + etc; } form.openStdWin(u, "_blank", 900, 600); void (0);

As you can see, from a contact form the Advanced Find bookmarklet opens a new window with advanced find defaulted to Contacts.

Now you don’t have to think about where you need to be to launch advanced find, as long as you’re inside CRM when you click the button it should take you right where you need to go!