Upgrading CRM 3 to CRM 4


I was assigned the task of Upgrading CRM 3.0 to CRM 4.0 !!

Following are the very useful articles on the same !!

http://blogs.msdn.com/crm/archive/2008/05/01/upgrading-to-crm-4-0.aspx

http://bradmarsh.net/index.php/2008/03/14/upgrading-crm-30-to-40/

https://nishantrana.me/wp-content/uploads/2009/08/steps-to-upgrade-to-crm-4.doc

http://dynamics-crm.megasolutions.net/How_To_Move_Microsoft_Dynamics_Crm_3.0_SQL_Databases.aspx

These are certain issues that we faced !!

http://mscrmsupport.wordpress.com/2008/05/14/crm-30-upgrade-issue-there-is-already-an-object-named-attributetypes-in-the-database/

http://support.microsoft.com/kb/927226

http://support.microsoft.com/kb/917948

http://support.microsoft.com/kb/910044/

 

 

Refer this as well

http://www.experts-exchange.com/Microsoft/Applications/Microsoft_Dynamics/Q_23386129.html

CRM4.0 Upgrade Path

1.      Create Database backup files for both Organization_Name_METABASE & Organization_Name_MSCRM
2.      Delete MSCRM_Config database from SQL (if it exists)
3.      Uninstall Microsoft CRM-Exchange E-Mail Router
4.      Uninstall Microsoft CRM 3.0.
5.      Reboot the server.
6.      Restore the 3.0 METABASE and MSCRM databases.
7.      Install Redeployment Wizard from the CRM 3.0 media.
8.      Create a new AD OU to use for the Security Groups that are created during redeployment. This is only to make sure there is no confusion between the old and new groups.

Steps 9 & 10 were only necessary because I was getting a “duplicate SQL server SPN” error in the EDW (Environmental Diagnostics Wizard). Ignore these if it is not a problem.

9.      Load SupportTools from CD2 of SBS Setup Disc.
10.      Delete the duplicate SPN from the SQL Server and Administrator Account using the ADSIEDIT.msc tool. (Delete MSSQLSvc/SQLServerName.DomainName.local:UnusedPortNumber)

11.      Launch the Redeployment Wizard.
12.      Choose the SQL server and select the restored 3.0 database. Should be named Org_Name_MSCRM and click Next.
13.      The Organization name should be populated, click Next.
14.      Browse out to the Organization Unit that was created in step 8 and click Next.
15.      Select Automap users and map by Active Directory account name. Choose Next.
16.      Users should all be mapped correctly. Click Next.
17.      This will give a quick overview of the choices made previously. Click Start.
18.      Start the CRM 3.0 Installation and enter license key. Click Next.
19.      Accept Terms and click Next.
20.      Choose Custom Setup.
21.      Enter Organization Name as shown in Step 7. Click Next
22.      Click Next on Customer experience.
23.      Click Next on installation directory.
24.      Select the Create new Web Site and click Next.
25.      Select SQL Server, Choose Connect to existing databases and the DB’s should auto populate. Click Next.
26.      Type in the Report Server URL and click Next.
27.      Leave Security account as Network Service and click Next.
28.      Choose Exchange Server and click Next.
29.      If you do not have any errors at the EDW (ignore database version mismatches) click Next.
30.      This will give the summary page. Click on Install.
31.      Once the installation completes reboot and cancel out of the initial setup.
32.      Launch the webclient and take the Administrator account out of Restricted Access Mode.
33.      Run ” SP_fulltext_database enable ” against the MSCRM database to enable full-text indexing.
34.      Create the full text index on the documentindex table.
a. Open the SQL Server Management Studio and expand Organization_Name_MSCRM database. Expand the view and click on tables.
b. Right-click on the DocumentIndex table, point to Full Text Index Table and point to Define Full-Text Indexing on a Table. This will open the Full Text Indexing Wizard. On the welcome page, select Next.
c. Select the Unique Index of PK_DocumentIndex. Click Next.
d. Select the Title, KeyWords, and Search Text columns and then click Next.
e. Track Changed Automatically and click Next
f. Type ftcat_documentindex for the Full-text catalog and Select Next.
g. You do not need to select or create a population schedule. Select Next to bypass this window.
h. Click Finish to complete the creation of the Full-Text Index.
35.      Remove old CRM4.0 setup logs
36.      Verify (or start) the SQL Reporting services is started
37.      Begin upgrade
38.      Reboot
39.      Test the installation
40.      Examine Setup Logs for errors

Success!

Bye…

Sample code for ISV.CONFIG form button to pass the object id of record.


Just thought of putting this code over here, as i need it frequently 🙂

This one is for case entity.

 

<Entity name="incident">
          <ToolBar ValidForCreate="0" ValidForUpdate="1">
            <Button Icon="/_imgs/ico/16_convert.gif" Url="http://www.google.co.in" PassParams="1" WinParams="" WinMode="0" Client="Web">
              <Titles>
                <Title LCID="1033" Text="Url Button" />
              </Titles>
            </Button>
            <Button Icon="/_imgs/ico/16_convert.gif" JavaScript="window.open(‘http://www.google.co.in?oId=’+crmForm.ObjectId ,”,”);" PassParams="1" WinParams="" WinMode="0" Client="Web">
              <Titles>
                <Title LCID="1033" Text="JavaScript Button" />
              </Titles>
            </Button>
          </ToolBar>
        </Entity>

 

Bye..

Disable parent form fields from related entities form


We had a requirement like when a opportunity record is created from within an account form, the fields in the account form should get disabled.

This is the JavaScript that could be used for doing so, it is on the onSave event of the Opportunity form.

 

if (
(window.opener != null) &&
(window.opener.parent != null) &&
(window.opener.parent.document != null) &&
(window.opener.parent.document.crmForm != null)) {

var parentForm = window.opener.parent.document.crmForm;

if (parentForm.ObjectTypeName == "account")
{

// disabling field individually
parentForm.name.disabled=true;

// loop through all the fields and disable them

for(i=0; i<parentForm.elements.length; i++)
      {
            parentForm.elements[i].disabled=true;
      }

// lookups need to be disabled separately
parentForm.parentaccountid.disabled=true;

}

}

 

Bye…

No Organization to select while configuring Microsoft Outlook client for CRM


I was trying to configure outlook client for CRM, after entering my url for the CRM server, the next screen, where we could select organization wasn’t displaying any organization.

I followed the steps mentioned in the following post and then i tried again and this time it was showing the name of the organizations there.

https://nishantrana.wordpress.com/2008/11/06/the-request-failed-with-http-status-401-unauthorized-mandatory-updates-for-microsoft-dynamics-crm-could-not-be-applied-successfully/

Bye..

Refresh Parent Form from child entity in CRM.


Check out this wonderful article by Andriy (the master in CRM) on it.

http://a33ik.blogspot.com/2009/05/page-refresh.html

And the same code translated for CRM 3.0.

function timerHandler()
{
var xml = "" +
"<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
"<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">" +
"  <soap:Body>" +
"    <query xmlns:q1=\"http://schemas.microsoft.com/crm/2006/Query\" xsi:type=\"q1:QueryExpression\" xmlns=\"http://schemas.microsoft.com/crm/2006/WebServices\">" +
"      <q1:EntityName>salesorder</q1:EntityName>" +
"      <q1:ColumnSet xsi:type=\"q1:ColumnSet\">" +
"        <q1:Attributes>" +
"          <q1:Attribute>modifiedon</q1:Attribute>" +
"        </q1:Attributes>" +
"      </q1:ColumnSet>" +
"      <q1:Distinct>false</q1:Distinct>" +
"      <q1:Criteria>" +
"        <q1:FilterOperator>And</q1:FilterOperator>" +
"        <q1:Conditions>" +
"          <q1:Condition>" +
"            <q1:AttributeName>salesorderid</q1:AttributeName>" +
"            <q1:Operator>Equal</q1:Operator>" +
"            <q1:Values>" +
"              <q1:Value xmlns:q2=\"http://microsoft.com/wsdl/types/\" xsi:type=\"q2:guid\">"+crmForm.ObjectId+"</q1:Value>" +
"            </q1:Values>" +
"          </q1:Condition>" +
"        </q1:Conditions>" +
"      </q1:Criteria>" +
"    </query>" +
"  </soap:Body>" +
"</soap:Envelope>" +
"";
var xmlHttpRequest = new ActiveXObject("Msxml2.XMLHTTP");
xmlHttpRequest.Open("POST", "/mscrmservices/2006/CrmService.asmx", false);
xmlHttpRequest.setRequestHeader("SOAPAction","http://schemas.microsoft.com/crm/2006/WebServices/RetrieveMultiple&quot;);
xmlHttpRequest.setRequestHeader("Content-Type", "text/xml; charset=utf-8");
xmlHttpRequest.setRequestHeader("Content-Length", xml.length);
xmlHttpRequest.send(xml);
var resultXml = xmlHttpRequest.responseXML;
var source = resultXml.selectSingleNode("//modifiedon").nodeTypedValue;
alert(source);
var firstpart = source.split(‘T’)[0];
var secondpart = source.split(‘T’)[1].split(‘+’)[0];
var parts =  firstpart .split(‘-‘);
var parts2 = secondpart.split(‘:’)
var modifiedon = new Date();
modifiedon.setYear(parts[0]);
modifiedon.setMonth(parts[1] – 1);
modifiedon.setDate(parts[2]);
modifiedon.setHours(parts2[0]);
modifiedon.setMinutes(parts2[1]);
modifiedon.setSeconds(parts2[2]);
if (modifiedon > openDate)
location.reload();
}
var openDate = new Date();
if (crmForm.FormType == 2)
setInterval(timerHandler, 1000);

 

Bye…

Understanding pipeline in CRM 4.0


Different stages in the event execution pipeline introduced in CRM 4.0.

Stage #1

•Pre-Operation – This is where custom logic can be registered to execute before the platform operation occurs. Logic that runs in this stage can stop further execution of the pipeline as we will discuss more in the plug-in chapters. Custom logic that runs in this stage is not part of the platform transaction.

Stage #2
•Pre-Operation – System – This stage is reserved as a pre-operation stage for system internal processing. Operations that occur as part of this stage are part of the Platform Transaction.You can’t register your own custom logic to run during this stage.

Stage #3
•Platform Operation – This is where the real work happens. The request/event that caused us to be in the pipeline is processed here and reflected on the state of the system. This stage is also part of the Platform Transaction. You can’t register your own custom logic to run during this stage.

Stage #4
•Post-Operation-System -This stage is also reserved as a post-operation stage for system internal processing. Operations that occur as part of this stage are part of the Platform Transaction. You can’t register your own custom logic to run during this stage.

Stage #5

•Post-Operation -This is where custom logic can be registered to execute. Custom logic in this stage can be either synchronous or asynchronous. Asynchronous logic will be handed off for processing by the Asynchronous Service queue. Custom logic that runs in this stage is not part of the platform transaction.

For better understanding of pipeline check out this wonderful article

http://crmscape.blogspot.com/2009/02/ms-crm-40-plug-in-stages-pipelines-and.html

Bye..

Nishant Rana's Weblog

Everything related to Microsoft .NET Technology

Skip to content ↓