Today I recieved a query to implement title case for the name fields in CRM.
This can simply be achieved by writing a custom Java Script method as below:
Add this code on the OnChange event of First Name attribute in Contact:
// JScript source code - TitleCase
var strTitleCase
var str = crmForm.all.firstname.DataValue
str.Substring(toUpperCase();
if(str != null)
{
strTitleCase = toTitleCase(str);
crmForm.all.firstname.DataValue = strTitleCase;
}
function toTitleCase(str)
{
return str.replace(/\w\S*/g, function(txt){return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();});
}
Subscribe to:
Post Comments (Atom)
Hi ,
ReplyDeleteWarm greetings from MasterMind Consulting!!!
We are a corporate training organisation in Bangalore. We provide training services to major IT companies in India. We have a 2 to 3 days training requirement on
“Microsoft CRM “
for one of our clients. Kindly revert if you are interested to take up such freelance assignments.
If yes kindly send us your profile and contact details to shalini@mastermindconsulting.in. Your quick response is appreciated. Kindly feel free to call me at 9845450603 for any clarifications
Regards,
Shalini
This article is efficient.Thank you for sharing it with us. I am visiting this blog on a daily basis and I am finding so much helpful article each time. Keep working on this and thank you once again.
ReplyDeleteMicrosoft Dynamics CRM Online Training