•   Posted in: 
  • CRM

This is an updated list – to extend the original list I made in the post here – of the Javascript bookmarks I have in my browsers, to make my life a bit easier as a power user in CRM. While the latest updates have made navigation a bit easier (especially with the addition of an advanced find button on all screens), I still find many of these links easier and quicker to use.

I have left the bookmarks unformatted because I am a bit lazy, but also so they can just be copied into a new bookmark url box without the new lines messing things up. This does mean that they don’t display so well here, so be warned.

GodMode: I picked this one (including the name) up somewhere along the way (sorry, I can’t find the original link to credit them with it), but tweaked it slightly. This essentially unlocks forms for you. It shows all hidden fields, unlocks all locked fields, clears all notifications and expands all tabs and sections. Use with caution as it can potentially circumvent client side controls and allow you to do things that users shouldn’t normally be able. However, anything important is actually being validated server side as well? Right?

javascript:%20try{var%20form=$("iframe").filter(function(){return%20$(this).css("visibility")=="visible"})[0].contentWindow;var%20attrs=form.Xrm.Page.data.entity.attributes.get();for(var%20i%20in%20attrs){attrs[i].setRequiredLevel("none")}var%20contrs=form.Xrm.Page.ui.controls.get();for(var%20i%20in%20contrs){try{contrs[i].setVisible(true);contrs[i].setDisabled(false);contrs[i].clearNotification()}catch(e){}}var%20tabs=form.Xrm.Page.ui.tabs.get();for(var%20i%20in%20tabs){tabs[i].setVisible(true);tabs[i].setDisplayState("expanded");var%20sects=tabs[i].sections.get();for(var%20i%20in%20sects){sects[i].setVisible(true)}}}catch(e){}

ShowSchemaNames:This does what it says on the tin: replaces all the field labels on the form with the schema names. This is useful as a developer when you need to know the name of the field to use in code and saves time instead of opening up the form or customisations.

javascript:function%20getFrame()%20{var%20$iframe%20=%20$('#crmContentPanel%20iframe:not([style*="visibility:%20hidden"])');if%20($iframe.length%20>%200%20&&%20$iframe[0].contentWindow.Xrm.Page.ui)%20{return%20$iframe[0].contentWindow;}else%20{return%20null;}}var%20frame%20=%20getFrame();if%20(frame%20==%20null)%20{alert('Please%20make%20sure%20you%20are%20on%20an%20entity%20form%20and%20try%20again.');}else%20{frame.Xrm.Page.ui.controls.forEach(function(a){a.setLabel(a.getName())});}

GetUrl:Pops up a dialog box with the URL of the current record in it. This gives you a quick way to grab a link to send to someone or open in a new window.

javascript:%20try{var%20iframe%20=%20$("iframe").filter(function%20()%20{%20return%20($(this).css('visibility')%20==%20'visible')%20})[0];var%20url%20=%20iframe.contentWindow.Xrm.Page.context.getClientUrl()%20+%20"/main.aspx?pagetype=entityrecord&etn="%20+%20iframe.contentWindow.Xrm.Page.data.entity.getEntityName()%20+%20"&id="%20+%20iframe.contentWindow.Xrm.Page.data.entity.getId().slice(1,%20-1);if%20(window.prompt("URL:",%20url))%20{%20}}catch(e){}

OpenProperties:Opens the properties page that existed in CRM 2011, but isn’t accessible anymore. Gives you an easy way to see created/modified by/on etc.

javascript:%20try{var%20frame%20=%20$("iframe").filter(function%20()%20{%20return%20($(this).css('visibility')%20==%20'visible')%20});%20var%20id%20=%20frame[0].contentWindow.Xrm.Page.data.entity.getId();%20var%20etc%20=%20frame[0].contentWindow.Xrm.Page.context.getQueryStringParameters().etc;%20frame[0].contentWindow.Mscrm.RibbonActions.openFormProperties(id,%20etc);}catch(e){}

OpenById:Know the schema name and Id of a record that you want to view? Enter those two bits of info in the dialogs that pop up and away you go.

javascript:%20try{var%20iframe%20=%20$("iframe").filter(function%20()%20{%20return%20($(this).css('visibility')%20==%20'visible')%20})[0];var%20entity%20=%20window.prompt("Entity:");var%20id%20=%20window.prompt("Id:");var%20url%20=%20iframe.contentWindow.Xrm.Page.context.getClientUrl()%20+%20"/main.aspx?pagetype=entityrecord&etn="%20+%20entity%20+%20"&id="%20+%20id;window.location%20=%20url;}catch(e){}

GoTo… (the following navigate you to the specified section within the CRM organization you are currently looking at.

Accounts

javascript:%20try{var%20o%20=%20new%20Object();%20o.uri%20=%20"/tools/Solution/home_solution.aspx?etc=1&sitemappath=SFA|Customers|nav_accts";%20window.top.document.getElementById("navBar").control.raiseNavigateRequest(o);%20void%20(0)}catch(e){}

Contacts

javascript:%20try{var%20o%20=%20new%20Object();%20o.uri%20=%20"/tools/Solution/home_solution.aspx?etc=2&sitemappath=SFA|Customers|nav_conts";%20window.top.document.getElementById("navBar").control.raiseNavigateRequest(o);}catch(e){}

Opportunities

javascript:%20try{var%20o%20=%20new%20Object();%20o.uri%20=%20"/tools/Solution/home_solution.aspx?etc=3&sitemappath=SFA|SFA|nav_oppts";%20window.top.document.getElementById("navBar").control.raiseNavigateRequest(o);%20void%20(0)}catch(e){}

Processes

javascript:%20try{var%20o%20=%20new%20Object();%20o.uri%20=%20"/tools/Solution/home_solution.aspx?etc=4703&sitemappath=Settings|ProcessCenter|nav_workflow";%20window.top.document.getElementById("navBar").control.raiseNavigateRequest(o);%20void%20(0)}catch(e){}

Administration

javascript:%20try{var%20o%20=%20new%20Object();%20o.uri%20=%20"/tools/Admin/admin.aspx?sitemappath=Settings|System_Setting|nav_administration";%20window.top.document.getElementById("navBar").control.raiseNavigateRequest(o);%20void%20(0)}catch(e){}

SystemJobs

javascript:%20try{var%20o%20=%20new%20Object();%20o.uri%20=%20"/tools/Solution/home_solution.aspx?etc=4700&sitemappath=Settings|System_Setting|nav_systemjobs";%20window.top.document.getElementById("navBar").control.raiseNavigateRequest(o);%20void%20(0)}catch(e){}

Customizations

javascript:%20try{var%20o%20=%20new%20Object();%20o.uri%20=%20"/tools/systemcustomization/systemcustomization.aspx?pagemode=iframe&sitemappath=Settings%7cCustomizations%7cnav_syscust";%20window.top.document.getElementById("navBar").control.raiseNavigateRequest(o);}catch(e){}

Users(2013 – where Users is under the Administration section in CRM)

javascript:try{var%20o%20=%20new%20Object();%20o.uri%20=%20"/tools/Admin/admin.aspx?sitemappath=Settings|System_Setting|nav_administration&pagemode=iframe&pid=07&web=true";%20window.top.document.getElementById("navBar").control.raiseNavigateRequest(o);}catch(e){}

Users (2015 – where Users is under the Security section in CRM)

javascript:try{var%20o%20=%20new%20Object();o.uri%20=%20"/tools/AdminSecurity/adminsecurity_area.aspx?sitemappath=Settings|System_Setting|nav_security&pagemode=iframe&pid=06&web=true";window.top.document.getElementById("navBar").control.raiseNavigateRequest(o);}catch(e){}