Tooltips are little help messages explaning a field or label (if you hover over a label you will notice a tooltip), I had a requirenment for adding a tooltip to a custom field with some custom help text.
After some digging through i found out the correct JScript property and method:
crmForm.all.my_custom_attribute_c.title = “Add a value here and it should get automatically populated..”;
End Result:

MSCRM-Admin CRM 4.0, Customizations, JavaScript crm 4, custom field, jscript, title, tooltips
Hello all,
I am currently working on a small CRM project and one of the requirements was to hide a section and a tab onLoad.
// Hiding the Contract section
crmForm.all.contractid_c.parentElement.parentElement.style.display=’none’;
// Hide the KB article tab (2nd Tab)
crmForm.all.tab1Tab.style.display=’none’;
I’m sure you can use this in other ways (i.e:. onChange, onClick etc..).
Happy Coding!
MSCRM-Admin CRM 4.0, Customizations, JavaScript form, hide, JavaScript, jscript, section, tabs
NotesCount is a client side JScript customization, which enables CRM useres to recognize the amount of attached notes or attachments to any CRM record (e.g. contact, account, case, …) within the tab on top of the main form of the record.
Intention
NotesCount is intended to improve the UX of all Microsoft Dynamics CRM 4.0 users. By showing the amount of attached notes or files referenced to CRM records without opening the notes tab it will reduce the risk to miss important information.
More info & Download: http://notescount.codeplex.com/
MSCRM-Admin CRM 4.0, Customizations, JavaScript count, crm4, entity, jscript, notes
Hi Guys,
Recently for a client, we had to create some many-to-1 relationship from Contact to Accounts & Opportunities. We then had the problem of the related entity navigation on the side showing up. They didn’t want to see all these related navigations. I added some onLoad code on the contact form to hide the Sidebar navigation.
Before:

The key is to get the relationship Elementid from the source code of the page (Press Ctrl + N to open new window, then click on the ‘view’ menu and click ’source’). Then find the Name of the Navigation and find the element id:

onLoad code:
document.getElementById("nav_new_contact_account_dm1").style.display = "none";
document.getElementById("nav_new_contact_account_dm2").style.display = "none";
document.getElementById("nav_new_contact_account_dm3").style.display = "none";
document.getElementById("nav_new_contact_account_dm4").style.display = "none";
document.getElementById("nav_new_contact_opportunity_dm1").style.display = "none";
document.getElementById("nav_new_contact_opportunity_dm2").style.display = "none";
document.getElementById("nav_new_contact_opportunity_dm3").style.display = "none";
document.getElementById("nav_new_contact_opportunity_dm4").style.display = "none";
After:

I hope this helps you all and gives you some idea of how powerful JavaScript & CRM are.
-MSCRM Person
MSCRM-Admin CRM 4.0, Customizations, JavaScript button, hide, JavaScript, jscript, navbar, onload, tab
Firstly i’d like to thank Michael Höhne for his great application that converts your c# code to Javascript. Basically you input your c# code and it sends a soap request and gets a reply and converts the request to Javascript so you can do it in realtime and not by a plug-in.
- First grab the application from: http://mscrmblog.net/downloads/JSWebCall.zip
- Open the project Visual Studio and double click on Form1.cs
- Go to the “try” line and input your c# code to be converted.
- Below i have my peice of code which just queries the systemuser entity for the GUID: F2EBE1D4-8E57-DD11-9225-000C29165D7E
<img class="alignnone" title="code c#" src="http://mscrmblog.net/downloads/codejs2.png" alt="" width="624" height="156" />
- Build the program and run the Application (from the bin\deubg dir)
- Click on the start and wait until you see a response in the response tab.
- Then move onto the Javascript tab and copy the code and paste it on a event (onchange, onload & onsave)
- Heres my final code:
window.setTimeout(RetrieveXML,1000);
function RetrieveXML()
{
var xml = "" +
"" +
"" +
GenerateAuthenticationHeader() +
" " +
" " +
" " +
" systemuser" +
" " +
" " +
" businessunitid" +
" " +
" " +
" false" +
" " +
" And" +
" " +
" " +
" systemuserid" +
" Equal" +
" " +
" "+crmForm.all.ownerid.DataValue[0].id+"" +
" " +
" " +
" " +
" " +
" " +
" " +
" " +
"" +
"";
var xmlHttpRequest = new ActiveXObject("Msxml2.XMLHTTP");
xmlHttpRequest.Open("POST", "/mscrmservices/2007/CrmService.asmx", false);
xmlHttpRequest.setRequestHeader("SOAPAction","http://schemas.microsoft.com/crm/2007/WebServices/RetrieveMultiple");
xmlHttpRequest.setRequestHeader("Content-Type", "text/xml; charset=utf-8");
xmlHttpRequest.setRequestHeader("Content-Length", xml.length);
xmlHttpRequest.send(xml);
var resultXml = xmlHttpRequest.responseXML;
var businessUnitName = resultXml.getElementsByTagName("q1:businessunitid")[0].getAttribute('name');
alert(businessUnitName);
}
- Basically this gets the businessunit name from the ownerid in the field.
Hope this helps.
MSCRM-Admin CRM 4.0, Customizations, JavaScript, SDK code, jscript, jsweb service, retrieve, web service, xml
Hi Guys,
Welcome to my new Blog. My name is Ibrahim Sukari (refer to the About Me page for more info), i am a CRM developer. The company i work for is called RightServ. We have done quiet a few CRM deployments with hefty customizations. I basically created this blog to give back to the community that indeed helped me during those tough deployments. I’ll be posting a range of stuff including code and how-to’s. I want this blog to be on top and become a ALL-IN-ONE resource for Microsoft Dynamics CRM!
Thanks!
MSCRM-Admin CRM 3.0, CRM 4.0, Customizations, Deployment, General, JavaScript, Licensing, Plug-ins, SDK code, crm, developer, ibrahim, jscript, new blog, plug-in, welcome
Recent Comments