The God Mode bookmarklet I unleashed on the world back in 2014 has been one of the most useful Dynamics 365 bookmarklets to date. Over the years there’s been a few minor updates to keep it working with the latest releases of Dynamics 365 (since a lot of what it was doing was unsupported).
However, with the release of the 2020 Wave 2 update by Microsoft, there’s been enough change that I feel it’s worth posting an updated version, and a much simpler version without all the unsupported stuff.
For starters, the AddOnSave hack no longer seems to work (kudos to Microsoft). This used to undo a preventDefault caused by another save event, essentially allowing the form to save, and bypass validation. Since this doesn’t work, that whole part has been removed from the bookmarklet.
Next the setDisplayState("expanded") part has been removed from the tabs loop. This was mostly relevant to the classic UI anyway, however now in the unified interface it just sets focus to the tab instead. This is not ideal as you end up switching to the last tab on the form every time you click the bookmarklet. Most importantly however, with 2020 Wave 2 it seems that the other code setting fields to be enabled and non-mandatory seems to have issues when focusing another tab at the same time. This meant fields “appeared” to still be locked or required, even though they weren’t.
The new bookmarklet code is as follows, which is much smaller than before (and still allows you to edit inactive records!):
The first part does a little (kinda hacky) check to see if it’s the Unified Interface (i.e. Xrm Page is accessible), otherwise it uses the old method of selecting the visible tab for the Classic UI, just to keep support for both modes.
I’ve updated this bookmarklet, and will be updating most others on my Bookmarklets GitHub project, as they’re all a little out of date now with the Unified Interface changing things. In the meantime, most can be simply updated with the same form variable check as I’m doing on this one.