Business Process is the new feature in CRM 2013 and user can add multiple steps on the form. However we don’t have ability to change the layout of the process bar and the step name will be wrapped automatically.
To show the step name on the form completely, we decide to increase the width of the step name label by loading the customized CSS file. Following is the screenshot of layout change, JavaScript and the CSS file.
Sample Java Script used:
//***************************************************************************
// Script Type: Changing Process step Label width
//***************************************************************************
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);
}
// End of the script
CSS:
/*Increase width of process step*/
.processControlContainer div.processStepLabel {
width: 230px!important;
}
.processControlContainer div.processStepLabel span {
max-width: 220px!important;
}
//end of CSS Script
______________________________________________________________
I hope you find it useful!
Author: Zhe Chen
Title: Lead Dynamics CRM Consultant @ Adisys
Email: zhechen@adisys.co
Reblogged this on Dinesh Ram Kali..
This code worked great, except for one little thing. If you only have three steps in a process the field to enter data shows up below the label instead of to the left of it. It is an aesthetic issue not a workflow or data issue. I will tweak the code a bit to see if I can adjust it.
Good to know it works for your requirement!
Hi Zhe,
Thank you for posting this article. I am new to Dynamics CRM 2013 and trying to make this script run on my CRM site. Would you be kind enough to show how can I add the JavaScript and CSS to my Opportunity Form?
Thanks!
Irfan
Irfan – You can add css file as web resource and call LoadCSS() on the form load event.
Is it supported in CRM 2016 also?
Hi,
is this working in Dynamics 365 ??
I tried but not working