Customize and Publish from CRM 2013 Forms with Bookmarklets

Posted: July 28, 2014 in Dynamics CRM 2013, JavaScript

In Dynamics CRM 2013 Customizers and Admins no longer have the ‘Customize’ tab on records anymore, which I often found useful for when we need to quickly get in and customize an entity, and then once done come back to the record and publish customizations.

To make things a little easier again, I’ve added these buttons back as browser bookmarklets. This will allow us to quickly and easily launch into the default solution, and automatically navigate us to the entity we’re on. We can also use this from other areas of the system, including views and dashboards, allowing us to jump straight into the customizations area without having to navigate through settings and losing our place in CRM.

I’ve also added a Publish button which can be used from anywhere in the system, including inside a solution and on a form. This will publish all customizations, and will be useful in times where there is no publish button available, for example when you edit a form and ‘Save & Close’ – you can now simply click the Publish bookmarklet to publish those changes instead of having to reopen the form or solution to publish.

The scripts to use for both of these bookmarks are as follows:

Customize:

javascript: var frame = $("iframe").filter(function () { return ($(this).css('visibility') == 'visible') }); var form = frame[0].contentWindow; try { var etc = form.Xrm.Page.context.getQueryStringParameters().etc; } catch(e) {} form.Mscrm.RibbonActions.openEntityEditor(etc);

 

Publish:

javascript: var frame = $("iframe").filter(function () { return ($(this).css('visibility') == 'visible') }); frame[0].contentWindow.Mscrm.FormEditor.PublishAll();
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s