THis script will set the default date of a form, this script is important because it sets the default date only for the Create form and not the update form. Otherwise the onload event will always set the date to the current date, even if its been updated. Credit to Sonomoa Partners.
var CRM_FORM_TYPE_CREATE = 1;
var CRM_FORM_TYPE_UPDATE = 2;
switch (crmForm.FormType)
{
case CRM_FORM_TYPE_CREATE:
crmForm.all.new_openddate.DataValue = new Date();
break;
case CRM_FORM_TYPE_UPDATE:
// do nothing
break;
}
I posted this question to the CRM Forums here and got some good feedback from Rhett Clinton.
if(crmForm.all.new_salesstageid.DataValue != null && crmForm.all.new_salesstageid.DataValue[0].name != "1")
crmForm.SetFieldReqLevel("new_projectmanagerid", 1);
else
crmForm.SetFieldReqLevel("new_projectmanagerid", 0);
And here is an example that works with multipe options
if(crmForm.all.new_salesstageid.DataValue != null) {
switch(crmForm.all.new_salesstageid.DataValue[0].name) {
case "1":
case "2":
crmForm.SetFieldReqLevel("new_projectmanagerid", 1);
break;
default:
crmForm.SetFieldReqLevel("new_projectmanagerid", 0);
break;
}
}
else
{
crmForm.SetFieldReqLevel("new_projectmanagerid", 0);
}
Security and Authentication in Microsoft Dynamics CRM: Connectivity and Firewall Port Requirements in On-Premise Deployments
This is a great white paper that has come into use for an enterprise solution I am working with on a client site. This document covers Connectivity and Firewall Port Requirements in On-Premise Deployments for Dynamics CRM 4.0.
Overview
Many data centers include firewalls between the end-users and the servers and other integrated systems that support an implementation of Microsoft Dynamics CRM 4.0. This document provides guidance on the connectivity requirements between Microsoft Dynamics CRM 4.0 and other systems to assist readers with proper firewall configuration in customer environments.
Always a good one to remember.
crmForm.new_fullname.DataValue = crmForm.new_firstname.DataValue + " " + crmForm.new_lastname.DataValue
Great article on compatibility between II6 and II7 b y ActiveXperts.
http://www.activexperts.com/support/activmonitor/online/ii6metabase/
How to install the IIS 6 Metabase Compatibility components on IIS 7
The ActiveXperts Network Monitor Web Configurator requires that the Windows Server 2008-based or Windows Vista-based computer where you are configuring a Virtual Directory has the IIS 6 Metabase Compatibility components installed.To install the IIS 6.0 Management Compatibility Components by using the Windows Server 2008 Server Manager
Click Start, click Administrative Tools and then Server Manager.
In the left navigation pane, expand Roles, and then right-click Web Server (IIS) and select Add Role Services.
On the Select Role Services pane, scroll down to IIS 6 Management Compatibility.
Select the check boxes for IIS 6 Metabase Compatibility and IIS 6 Management Console.
Click Next from the Select Role Services pane, and then click Install at the Confirm Installations Selections pane.
Click Close to leave the Add Role Services wizard.
To install the IIS 6.0 Management Compatibility Components by using the Windows Vista Control PanelClick Start, click Control Panel, click Programs and Features, and then click Turn Windows features on or off.
Open Internet Information Services.
Open Web Management Tools.
Open IIS 6.0 Management Compatibility.
Select the check boxes for IIS 6 Metabase and IIS 6 configuration compatibility and IIS 6 Management Console.
Click OK.
Just had a strange issue on a development server where I was not able to add a new custom entity? After a little research I found the following two articles on this topic. It seems that an old rollup was the cause, in my case a simple IISRESET did the trick however here are the two dated links.
Hi,
I have a CRM client with the pockets to polish the applications to their needs. I, being the semi coder that I am and having little experience with plug-ins searched high and low for a tool to hide the annoying system views that cannot be removed from CRM 4.0. By pur chance I am certain the CRM team does not allow CRM 4.0 system views to be unshared as could be done in 3.0.
After locating a few other posts out there in the web I stumbled across the “lightly documented” Codeplex Plug-in by David Jennaway completed with source code and compiled code. After annoying the MS Forums (Even David himself jumped in) looking for help I finally got it working and decided to give back by giving some instructions as to the configuration of this Plug-in.
Let’s begin…
What makes David Jennaway’s plug-in simply amazing is that it can handle just about any system view you throw at it because a non coder doesn’t have to configure it with much more than the actual view name. From beginning to end here is how to to get this plug-in working on your CRM server.

button for the entity in question. Adjust your xml as necessary then proceed.<?xml version="1.0" encoding="utf-8" ?> <entities> <!- Sample configuration data. Entities are identified by the otc attribute, and views by name --> <entity otc="1"> <view>Inactive Accounts</view> <view>Accounts: No Orders in Last 6 Months</view> </entity> <entity otc="4"> <view>Leads Opened Last Week</view> <view>Leads Opened This Week</view> </entity> </entities>
Note: the other options can be changes per your wishes…

button for the entity in question. You final Step should look something like this!
Great videos on Microsoft Dynamics CRM 4.0 development. found here.
Most appear to be large wmv downloads.
Microsoft Corporation
July 2008
SummaryThis article contains links to presentations and labs to help developers use their existing .NET skills to build on top of the Microsoft Dynamics CRM 4.0 platform.
Applies ToMicrosoft Dynamics CRM 4.0
IntroductionThis kit is for .NET-based developers who want to ramp up and build on top of the Microsoft Dynamics CRM platform. Microsoft Dynamics CRM 4.0 uses familiar components such as Web Service endpoints, Windows Workflow Foundation, SSRS reporting, and more; making it a general purpose platform for any line-of-business applications. Developers can use their existing .NET skills to take advantage of various features of the Microsoft Dynamics CRM platform. This kit drills into the details of such development and explains how developers can connect, extend, and embed with the Microsoft Dynamics CRM platform. It includes presentations, hands-on labs and a VPC environment for practicing. This content was delivered earlier as part of the Metro Early Adopter initiative and the video recordings of the ramp-up presentations are included as well. Familiarity with the .NET Framework, Microsoft Visual C#, Microsoft JScript, Microsoft SQL Server and general Web development is recommended.
Great script for hiding buttons on forms, this can be used for both custom buttons or out of the box buttons. Code is from DMCRM and can be found here.
onload
//Get all of the List Elements
var lis = document.getElementsByTagName('LI');
var i = 0;
//Loop through the list items
while (i < lis.length) {
//Don't worry about any list item that doesn't have the title you are looking for.
if (lis[i].getAttribute('title') == 'Qualify or disqualify the lead')
{
//Replace the DHTML with blank tags to hide the button
lis[i].outerHTML='<SPAN></SPAN>'
}
i = i + 1;
}
Update: The “Messages” associated with an entity control the tags, be sure you make these updates after updating the messages.
I did this once a while back for a client and may need to do it soon again on my current client. I found this blog entry while looking at another entry on the MSCRMBLOG.net site.
![]()

Categories
Tag Cloud
Blog RSS
Comments RSS
Last 50 Posts
Back
Void « Default
Life
Earth
Wind
Water
Fire
Light 