CRM 2013 – Business Process Flow – How to hide the ‘Create +’ button on the process bar

Dynamics CRM 2013 BPFs have many beneficial qualities.  They are available for both OOB and custom entities, can span across multiple entities. You can design business process flows that tie together the records for up to five different entities into a single process so that people using CRM can focus on the flow of their process rather than on which entity they are working in. They can more easily navigate between related entity records.

The ‘Create’ button will show up after clicking Next Stage on the process bar allowing user to create the associated record and attach it to the process.

 

Dynamics CRM Process Bar

Dynamics CRM Process Bar

We have business requirement to automatically create one single record (Entity B) associated to Entity A so that user can simply select the created record from the pop up menu. This can be easily implemented by workflow. However the ‘Create+’ button in the pop up menu is always displayed and user might click it by mistake to create one more record.

My solution is to dynamically overwrite the CSS to hide the link dynamically. Following is the details:

Dynamics CRM Process Bar

Dynamics CRM Process Bar

 

JavaScript:

function LoadCSS() {

var head = document.getElementsByTagName(‘head’)[0];

var link = document.createElement(‘link’);

var path = Xrm.Page.context.getClientUrl() + “/WebResources/_cssfile”;

link.rel = ‘stylesheet’;

link.type = ‘text/css’;

link.href = path;

link.media = ‘all’;

head.appendChild(link);

 

}

 

CSS:

/*Hide the ‘Create +’*/

.processNavigateMenu.ui-flyout-dialog .navigateFooterSection .navigateMenuCreate{display:none !important;}

 

I hope you find it useful!

Author: Zhe Chen
Title: Lead Dynamics CRM Consultant @ Adisys
Email: zhechen@adisys.co

Advertisements