Tuesday 30 July 2013

New Post by Redmond : Rumor: Dynamics CRM 2013 To Hit General Availability in October



A recent post on the Dynamics CRM blog may have narrowed the timeframe for the launch of Dynamics CRM 2013 down to a possible date in October. A session on Dynamics CRM 2013 at the upcoming Partner Connections Event in Tampa, Fla., will be Microsoft's "first, official partner readiness event following the launch of this exciting product," according to a blog post on Friday attributed to David Pennington, Microsoft director of product marketing for Dynamics CRM.


Read the Complete post here.


Thanks .... Enjoy !!!!!!!!!!!

Monday 29 July 2013

Upcoming CRM 2013 Certifications - Get Ready For New Challenge !!!


Microsoft released the Certification information for CRM 2013.

Course
Title
Certification Exam
80546
Sales Management and Marketing Automation in Microsoft Dynamics CRM 2013 (coming Q4 Calendar Year 2013)
Exam MB2-700: Microsoft Dynamics CRM 2013 Applications (coming Q4 Calendar Year 2013)
80545
Service Management and Service Scheduling in Microsoft Dynamics CRM 2013 (coming Q4 Calendar Year 2013)
80539
Installation and Deployment in Microsoft Dynamics CRM 2013 (coming Q4 Calendar Year 2013)
Exam MB2-702: Deploying Microsoft Dynamics CRM 2013 (coming Q4 Calendar Year 2013) OR  Exam MB2-722: Deploying Microsoft Dynamics CRM Online Fall ’13 (coming Q4 Calendar Year 2013)
80542
Customization and Configuration in Microsoft Dynamics CRM 2013 (coming Q4 Calendar Year 2013)
Exam MB2-703: Microsoft Dynamics CRM 2013 Customization and Configuration (coming Q4 Calendar Year 2013)    OR   Exam MB2-721: Microsoft Dynamics CRM Online Fall ‘13 Customization and Configuration (coming Q4 Calendar Year 2013)



For More Info about Technical and Applications Course. Requires Partner source ID.


Thanks  Enjoy !!!!

Friday 19 July 2013

Exiting Program with exception : The caller was not authenticated by the service – CRMSvcUtil tool error



While generating proxy file for CRM 2011 using CRMSvcUtil, frequently we use to get this error.
"Exiting Program with exception : The caller was not authenticated by the service – CRMSvcUtil tool error
Enable tracing and view the trace files for more information".









This is because system is unable to find the domain of the particular user.

To resolve this error , we have to include domain in the parameter.
/domain:Test
This will resolve this issue.

Refer this my previous post to generate proxy file using CRMSvcUtil for CRM 2011.


Thanks and Enjoy.............................
 

Thursday 18 July 2013

Generating Proxy cs using CrmSvcUtil.exe with Screenshot


CrmSvcUtil.exe is a command-line code generation tool for use with Microsoft Dynamics CRM 2011 and Microsoft Dynamics CRM Online. This tool generates early-bound .NET Framework classes that represent the entity data model used by Microsoft Dynamics CRM.

The CrmSvcUtil.exe tool creates a Microsoft Visual C# or Microsoft Visual Basic .NET output file that contains strongly-typed classes for entities in your organization. This includes custom entities and attributes. This output file contains one class for each entity, providing early binding and IntelliSense support in Microsoft Visual Studio to aid you as you write custom code.
CRMSVCUtil will be available in SDK- >\sdk\bin\crmsvcutil.exe
Run this exe through cmd prompt with parameters.
1)      Open cmd prompt and route to the sdk exe folder path



2)      Then give the exe name with CRM organization URL, username, password domain name and output file name.

Output filename : proxy.cs
Username : Adminuser
Password : test@123
Domain : test

3)      After Pressing “Enter”, the exe will be running and generating proxy class in the output path.





Now the output file is saved in sdk\bin\.
Note : This sample is for CRM 2011- on premise. 
For online CRM we need to pass device id in the parameter. Go through this blog for complete details and parameters information.
 

Tuesday 16 July 2013

Error while uninstalling / repairing SRSdataconnector for CRM 2011.


I was facing the below while trying to repair Srsdataconnector and finally i resolved this.


\Error| System.Exception: Publishing CRM reports failed. ---> System.TypeInitializationException: The type initializer for 'Microsoft.Crm.Admin.AdminService.PIDGenNativeMethods' threw an exception. ---> System.TypeInitializationException: The type initializer for 'LicenseFilesLocationCache' threw an exception. ---> Microsoft.Crm.CrmException: Cannot load PidGen.dll because the following file locations do not exist:
C:\Program Files\Microsoft Dynamics CRM Reporting Extensions\PFiles\MSCRM\Server\bin\
and because cannot build files locations from the Registry for the following:
root = HKEY_LOCAL_MACHINE, path = SOFTWARE\Microsoft\MSCRM, key = CRM_Server_InstallDir
root = HKEY_LOCAL_MACHINE, path = Software\Microsoft\MSCRM Live, key = CRM_Live_InstallDir
   at Microsoft.Crm.Admin.AdminService.PIDGenNativeMethods.LicenseFilesLocationCache..cctor()
   --- End of inner exception stack trace ---
   at Microsoft.Crm.Admin.AdminService.PIDGenNativeMethods.LicenseFilesLocationCache.get_Directory()
   at Microsoft.Crm.Admin.AdminService.PIDGenNativeMethods..cctor()
   --- End of inner exception stack trace ---
   at Microsoft.Crm.Admin.AdminService.PIDGenNativeMethods.ValidateProductKeyV5(String sKey)
   at Microsoft.Crm.Admin.AdminService.LicenseHelper.ReadLicense(Version buildVersion)
   at Microsoft.Crm.Admin.AdminService.CrmLicenseService.IsDeploymentExpired()
   at Microsoft.Crm.Caching.OrganizationSettingsCacheLoader.LoadCacheData(Guid key, ExecutionContext context)
   at Microsoft.Crm.Caching.ObjectModelCacheLoader`2.LoadCacheData(TKey key, IOrganizationContext context)
   at Microsoft.Crm.Caching.CrmMultiOrgCache`2.CreateEntry(TKey key, IOrganizationContext context)
   at Microsoft.Crm.Caching.CrmMultiOrgCache`2.LookupEntry(TKey key, IOrganizationContext context)
   at Microsoft.Crm.BusinessEntities.SystemUserContext..ctor(ExecutionContext context, Boolean switchAuditingInfo)

Fix :

I have resolved this by created the path location manually which installer requires as per the error log.
C:\Program Files\Microsoft Dynamics CRM Reporting Extensions\PFiles\MSCRM
Then copied the Server folder from C:\Program Files\Microsoft Dynamics CRM Reporting Extensions\\MSCRM\.
Then Start run the Srsdataconnector.exe and “Repair”. This blog helped to resolve this error.


Microsoft Dynamics - Certification Retirement Notice

Prepare for New Certifications in next 12 month.

Microsoft will continue to support the achievement of existing Microsoft Dynamics MCTS and MCITP certifications until further notice. Under each certification below, please check for a Certification Retirement Notice for more information. Microsoft plans to retire all Microsoft Dynamics MCTS and MCITP certifications by December 31, 2014. We will announce replacement and additional certifications for new versions of Microsoft Dynamics products over the next 12 months.


Microsoft Certified Technology Specialist (MCTS)

Certification Retirement Notice: Microsoft will continue to support the achievement of these MCTS certifications until December 31, 2014, at which time these certifications will be retired. Microsoft plans to retire all MCTS certifications for Microsoft Dynamics products by December 31, 2014. We will announce replacement and additional certifications for new versions of this Microsoft Dynamics product over the next twelve months.

Certification title
Exam number
Microsoft Dynamics CRM 2011 Applications
MB2-868
Microsoft Dynamics CRM 2011 Customization and Configuration
MB2-866
Extending Microsoft Dynamics CRM 2011
MB2-876
Microsoft Dynamics CRM 2011 Installation and Deployment
MB2-867

 

For other Microsoft Dynamics Products like AX, GP, NAV, please visit this blog


Thanks ................

Monday 15 July 2013

The dependent component WebResource (Id=(webresource_main_system_library.js) does not exist. Failure trying to associate it with SystemForm (Id=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx) as a dependency. Missing dependency lookup type = PrimaryNameLookup.

Hi ,

Last few days i was facing one error while publishing my custom entity which got imported from CRM 4.0.

Error :

The dependent component WebResource (Id=(webresource_main_system_library.js) does not exist. Failure trying to associate it with SystemForm (Id=) as a dependency. Missing dependency lookup type = PrimaryNameLookup.


I have resolved this by doing the following step.


1) Queried the form id (which i got in the error log) in Systemform table.

2) In the result window, i got one column which xml values.

3) Copied and opened the xml in vs xml editor or notepad.Then searched for the webresource name (which i got in the error log).

4) Then i found the dependent fields.

5) I removed that field from the form. Saved and Published.

6) Then again i added the removed field and published.


Check this Post


Thanks.... Enjoy.....................


Sunday 14 July 2013

Microsoft Dynamics CRM 4.0 to 2011 Migration Pre-requisites. (MSDN Collection)




Before going for Microsoft CRM 4.0 to 2011 Migration. We have to do something in the registry level of both Application and SQL server to make the import process faster and error free.

(Below information gather from Microsoft).

Set the organization optimization when importing on the CRM server(s) 

1. On the Microsoft Dynamics CRM 4.0 Server, click Start, click Run, type regedit, and then click OK.
2. Locate the following registry subkey: HKEY_LOCAL_MACHINE\Software\Microsoft\MSCRM.
3. Under the MSCRM key add a new dword value called OptimizeOrgImport.
4. Right-click the new value, choose Modify, enter 1 and then click OK.
5. Again under the MSCRM key add a new dword value called OptimizeOrgImport_KeepUserMappings.
6. Right-click the new value, choose Modify, enter 1 and then click OK.
7. Close the registry editor.

Now you need to set the MaxUserPort and TCPTimedWaitDelay on both the CRM server(s) and the SQL server.

1. On the CRM server(s); click Start, click Run, type regedit, and then click OK.
2. Locate and then click the following registry subkey: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters
3. Right click Parameters, point to New, click DWORD Value, and then type MaxUserPort.
4. Right click MaxUserPort, click Modify, and then type 65534 for Value data, and set the radio button next toDecimal.
Note: This value controls the number of dynamic ports that are available. The valid range for this value is 5,000-65,534. Specifically, this parameter controls the maximum port number that is used when a program requests any available user port from the system.
5. Now, locate the following registry subkey: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters
6. Right click Parameters, point to New, click DWORD Value, and then type TCPTimedWaitDelay.
7. Right click TCPTimedWaitDelay, click Modify, type 30 for the Value data, and set the radio button next to Decimal.
Note: This parameter determines the length of time that a connection stays in the TIME_WAIT state when it is closed. When a connection is in the TIME_WAIT state, the socket pair cannot be re-used. This is also known as the "2MSL" state. Typically, this value is two times the maximum segment life time on the network.
8. Exit Registry Editor.
9. Restart the Microsoft Dynamics CRM server(s).
10. Go to the SQL server and perform steps 1- 8 on that server.
11. Restart the SQL server. 

Remove the unsupported stored procedure 

1. On the SQL server, open SQL Management Studio.
2. Locate the MSCRM database and expand it.
3. Expand Programmability and then expand Stored Procedures.
4. If there are any stored procedures you have added, please make a backup and delete them. 

Clean up the AsyncOperatioBase table of completed jobs 



Rebuild all indexes on the MSCRM database 

1. On the SQL server, Open SQL Management Studio.
2. Click the New Query button.
3. Change the database dropdown to MSCRM.
4. Paste the following into the new query editor window.
USE MSCRM
GO
EXEC sp_MSforeachtable @command1="print '?' DBCC DBREINDEX ('?', ' ', 80)"
GO
5. Click the Execute button.
NOTE: This process will take some time to complete. Please let it finish before continuing.

Set MSCRM database recovery model to Simple

1. On the SQL server, open SQL Management Studio.
2. Locate the MSCRM database, right-click on it and choose Properties.
3. Click Options.
4. Change the Recovery Model to Simple and then click OK. 

Shrink the MSCRM database

1. On the SQL server, Open SQL Management Studio.
2. Locate the MSCRM database; right-click on it, point to Tasks, and then click on Backup. Backup the MSCRM database.
3. Now click on the New Query button. The query editor window will open.
4. Type the following into the query editor window.
DBCC shrinkdatabase (MSCRM, truncateonly);
5. Click the Execute button.
6. Once the shrink process has completed, backup the MSCRM database again.
7. Delete the MSCRM backup that you took from step 2.

Import the MSCRM 4.0 database into the CRM 2011 deployment 

1. On the CRM server, open the Deployment Manager.
2. Right-click Organizations and choose Import Organizations.
3. Select the SQL server and the MSCRM database and click Next.
4. Click Next at the display name and report server URL if they are correct.
5. At the next screen choose “Select Custom Mapping Options”.
6. Choose Manually map users and then click Next.
7. Locate an account that is a system administrator and map the user you are currently logged in with to this user.
8. Click Next.
9. Verify that the checks out correctly and then click next. If there are errors or warnings (ignore the db version warning) please let me know before continuing.
10. Finally import the  organization.
NOTE: The above steps are only for testing the import in a much faster way. Once the production db will be imported you will need to map all of the users.

Also you go through this post for more information.



Tuesday 9 July 2013

Automating CRM 2011 Solution Backup - Programmatically (Import , Create, Retrieve Solution)



Recently i was working in CRM 2011 customizations, after completion of the customization , i have Exported the solution for my backup purpose. This i planned to automate daily. So i have created one Asp.net program to Automate this backup process.


The following sample shows how to export the solution from CRM online and save it in specified location.


Step 1 : Create a “Console Application” in Visual studio under Visual C# templates.
Step 2 : Give the Project and Solution Name, Make sure that .Net Framework must be 4.
Step 3 : Click “Ok”.

 


 



Step 4: Add the following References to the project from sdk\bin folder
             CRM References – Microsoft.Crm.Sdk.Proxy , Microsoft.Xrm.Sdk
             .Net References – System.ServiceModel, System.Runtime.Serialization,System.Security




Step 5 : Right Click the “ExportCRMonlineSolution” project and click “Add Existing Item”.
              Select “deviceidmanager.cs” from the sdk folder. (sdk\samplecode\cs\helpercode)



Your “Solution Explorer” should look like this.






Step 6 :  Add the following Namespace to the project.

using System.ServiceModel;
using System.IO;
using System.ServiceModel.Description;
using System.Net;
using Microsoft.Crm.Sdk.Messages;
using Microsoft.Xrm.Sdk;
using Microsoft.Xrm.Sdk.Client;
using Microsoft.Crm.Services.Utility;

 
Step 7 : Now Add the below code in the Main

       string userName = "<CRM online username>";
       string passWord = "<CRM online password>";
       string SolName = "<solution which is available in online CRM>";

       ClientCredentials credentials = new ClientCredentials();
       credentials.UserName.UserName = userName;
       credentials.UserName.Password = passWord;

       credentials.Windows.ClientCredential = CredentialCache.DefaultNetworkCredentials;
       Uri organizationUri = new Uri("<crm online organization service url>");
       Uri homeRealmUri = null;
          
    # region Getting Current datetime information -- This is not mandatory we can skip
  
       string fileDate = DateTime.Now.Date.ToShortDateString();
       string formatedDate = fileDate.Replace("/", "-");
       string fileTime = DateTime.Now.ToShortTimeString().Replace(" ", "-");
       string formatedTime = fileTime.ToString().Replace(":", "-");
       string finalformat = formatedDate+"_"+formatedTime;

     #endregion
       
       using (OrganizationServiceProxy serviceProxy = new OrganizationServiceProxy(organizationUri, homeRealmUri, credentials, GetDeviceCredentials()))
            {
                 String outputDir = @"C:\temp\";

                 ExportSolutionRequest expsolreq = new ExportSolutionRequest();
                 expsolreq.Managed = false;
                 expsolreq.SolutionName = SolName;

                 ExportSolutionResponse expsolres = (ExportSolutionResponse)serviceProxy.Execute(expsolreq);

                 byte[] exportXml = expsolres.ExportSolutionFile;
                 string filename = SolName + "_" + finalformat + ".zip";
                 File.WriteAllBytes(outputDir + filename, exportXml);
              
                 Console.WriteLine("Solution Exported to {0}", outputDir + filename);

            }    

 
Step 8 :   Add the below method outside of the Main – This is to get the deviceid credentials for the particular running machine. This is required for CRM online.



        private static ClientCredentials GetDeviceCredentials()
        {
            return Microsoft.Crm.Services.Utility.DeviceIdManager.LoadOrRegisterDevice();
       


Step : 9 Your complete project looks likes the below


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using System.ServiceModel;
using System.IO;
using System.ServiceModel.Description;
using System.Net;
using Microsoft.Crm.Sdk.Messages;
using Microsoft.Xrm.Sdk;
using Microsoft.Xrm.Sdk.Client;
using Microsoft.Crm.Services.Utility;


namespace ExportSolution
{
    public class Program
    {              
    
        static public void Main(string[] args)
        {

     string userName = "<CRM online username>";
            string passWord = "<CRM online password>";
            string SolName = "<solution which is available in online CRM>";

            ClientCredentials credentials = new ClientCredentials();
            credentials.UserName.UserName = userName;
            credentials.UserName.Password = passWord;

            credentials.Windows.ClientCredential = CredentialCache.DefaultNetworkCredentials;
            Uri organizationUri = new Uri("<crm online organization service url>");
            Uri homeRealmUri = null;

            # region Getting Current datetime information -- This is not mandatory we can skip

            string fileDate = DateTime.Now.Date.ToShortDateString();
            string formatedDate = fileDate.Replace("/", "-");
            string fileTime = DateTime.Now.ToShortTimeString().Replace(" ", "-");
            string formatedTime = fileTime.ToString().Replace(":", "-");
            string finalformat = formatedDate+"_"+formatedTime;

            #endregion
           
                 using (OrganizationServiceProxy serviceProxy = new OrganizationServiceProxy(organizationUri, homeRealmUri, credentials, GetDeviceCredentials()))
                 {
                     String outputDir = @"C:\temp\";

                     ExportSolutionRequest expsolreq = new ExportSolutionRequest();
                     expsolreq.Managed = false;
                     expsolreq.SolutionName = SolName;

                     ExportSolutionResponse expsolres = (ExportSolutionResponse)serviceProxy.Execute(expsolreq);

                     byte[] exportXml = expsolres.ExportSolutionFile;
                     string filename = SolName + "_" + finalformat + ".zip";
                     File.WriteAllBytes(outputDir + filename, exportXml);
               
                     Console.WriteLine("Solution Exported to {0}", outputDir + filename);

                 }          
                
        }
        private static ClientCredentials GetDeviceCredentials()
        {
            return Microsoft.Crm.Services.Utility.DeviceIdManager.LoadOrRegisterDevice();
        }             
       
    }   
  
}



Step 10 : Now Build the solution, also check that Framework should be in 4.

Step 11 : Press F5 to run the program. Solution zip file must be saved in the mentioned output directory.


Also we can do

  • Create a publisher.
  • Retrieve the default publisher.
  • Create a solution.
  • Retrieve a solution.
  • Add an existing solution component.
  • Remove a solution component.
  • Install or upgrade a solution.
  • Delete a solution.
To do this points please go through this complete post.

Try this out and Post your comments......     Thanks.........!!!!!!!!!!!!!