Fri 28 Aug 2009

Yesterday, after restoring CRM DB backup on other maching and importing Organization using Deployment Manager of CRM 4.0, I received this error.

The SELECT permission was denied on the object 'BuildVersion', database 'MicrosoftCRM_MSCRM', schema 'dbo'
or the variation
The SELECT permission was denied on the object 'SystemUser', database 'MicrosoftCRM_MSCRM', schema 'dbo'

If you have tried changing the owner of new database with admin login making it as dbowner but did not help then following may help solving this problem

Right click the affected object (table/view etc) in my case it was 'BuildVersion' and 'SystemUser' in SQL Server Management Studio,
click on properties
click on "Permissions" on left tab
click on "View schema permission" link on right tab
click on "Add" button,
click on "Browse" 
select "CRMReaderRole" of type Database role.
click ok,
click ok,
now you will be again in object properties.
Place check mark in "Grant" column against "Select" permission
click ok

Now check hope so it has been resolved.

================

To change the dbowner command is (If required)

use <CRMDatabaseThatYouNeedToChangeTheOwner>
exec sp_changedbowner 'DOMAIN\AdministratorMappedWithCrmAdmin'
go


===============

E-mail this post to someone or Comments (2)
Tue 25 Aug 2009

I was getting this error
No authority could be contacted for authentication
   at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
   at Microsoft.Crm.ReportingServices2005.ReportingService2005.CreateReport(String Report, String Parent, Boolean Overwrite, Byte[] Definition, Property[] Properties)
   at Microsoft.Crm.Reporting.ReportServer.UploadReport(String path, Byte[] reportDefinition, String name, String description)

along with this error
Stack Trace Info: [MissingParameterException: The 'CRM_CalendarType' parameter is missing a value]
   at Microsoft.Reporting.WebForms.ParametersArea.ValidateAllReportInputsSatisfied()
   at Microsoft.Reporting.WebForms.ReportViewer.OnPreRender(EventArgs e)

This error may have many resons. The resoultion which help me in solving this problem was to first unjoin then again join report server machine to/from domain. 

If above did not help in solving then do the following which is "totally not recommended" and "should not do" in production server
Allow annonymous access and select priviliged user / administrator in ReportServer's virtual directory -> properties -> Directory Security

Tags: ,
E-mail this post to someone or Comments here
Sat 22 Aug 2009


Following code will help to Retrieve Cultures information from CRM into your Custom Web Application

                     // Retrieve the Locale IDs from the server.
                    RetrieveProvisionedLanguagesRequest reqLang = new RetrieveProvisionedLanguagesRequest();
                    RetrieveProvisionedLanguagesResponse resLang = (RetrieveProvisionedLanguagesResponse)crmService.Execute(reqLang);

                    // Create a CultureInfo array that represents the available languages.
                    System.Globalization.CultureInfo[] cultures =
                        new System.Globalization.CultureInfo[resLang.RetrieveProvisionedLanguages.Length];

                    for (int i = 0; i < resLang.RetrieveProvisionedLanguages.Length; i++)
                    {
                        cultures[i] = System.Globalization.CultureInfo.GetCultureInfo(resLang.RetrieveProvisionedLanguages[i]);
                    }


If you are looking for Globalization / Localization in Custom Web Application, have a look at

http://faisalmb.com/blog/post/2009/08/21/CRM-Globalization-Localization-in-Custom-Web-Application.aspx

 

 

 

Tags: ,
E-mail this post to someone or Comments here
Fri 21 Aug 2009

If you required to set localization / culture in your custom web application that is running in IFRAME section of your CRM Application, according to User preferred language selected by user in Language option, go with the following

 Override the InitializeCulture() method in your custom web application as


        protected override void InitializeCulture()
        {
                base.InitializeCulture();

                WhoAmIRequest whoAmIRequest = new WhoAmIRequest();
                WhoAmIResponse whoAmIResponse = (WhoAmIResponse)crmService.Execute(whoAmIRequest);

                // Get the usersettings entity
                RetrieveUserSettingsSystemUserRequest reqUserSettings = new RetrieveUserSettingsSystemUserRequest();
                reqUserSettings.EntityId = whoAmIResponse.UserId;
                ColumnSet columns = new ColumnSet();
                columns.Attributes = new String[] { "uilanguageid" };
                reqUserSettings.ColumnSet = columns;
                reqUserSettings.ReturnDynamicEntities = true;
                CrmNumberProperty langProp = null;
                int langCode = 0;
                try
                {
                    //Get current logged in user setting
                    RetrieveUserSettingsSystemUserResponse resUserSttings = (RetrieveUserSettingsSystemUserResponse)crmService.Execute(reqUserSettings);
                    DynamicEntity objUserSettings = (DynamicEntity)resUserSttings.BusinessEntity;
                    foreach (Property prop in objUserSettings.Properties)
                    {
                        langProp = (CrmNumberProperty)prop;
                        if (langProp.Name.Equals("uilanguageid"))
                        {
                            //langCode = (CrmNumberProperty)objUserSettings.Properties["uilanguageid"];
                            langCode = langProp.Value.Value;
                            break;
                        }
                    }

                    //Set culture
                    Thread.CurrentThread.CurrentCulture = new CultureInfo(langCode);
                    Thread.CurrentThread.CurrentUICulture = new CultureInfo(langCode);

               }

                catch (System.Web.Services.Protocols.SoapException se)
                {
                    // Log it
                }
        }

If you are looking for Retrieve Cultures information from CRM into your Custom Web Application, have a look at

http://faisalmb.com/blog/post/2009/08/21/CRM-Retrieve-Cultures-information-from-CRM-into-your-Custom-Web-Application.aspx

 

Tags: ,
E-mail this post to someone or Comments here
Wed 19 Aug 2009

If you are getting a popup while navigating through Microsoft Dynamics CRM Application asking you to save Blank.aspx file, following workaround will help you

 

 

Please edit the default blank.aspx file in CRM (Sever where CRM is installed) so it contains data. This file is located at My Computer | System Drive | Program Files | Microsoft Dynamics CRM | CRMWeb |_ root. Here you will find the Blank.aspx text file.

 

Open the file and add some text to the file, for example you can add "Test" to the file (then there would be following three lines)

 

Test

<% Response.Expires = 1440; %>

<% Response.Cache.SetCacheability(HttpCacheability.Public); %>

 

 

 

Once you have added data, save the file, clear your temporary Internet Files, and do an IISreset. Once this is done go back into CRM to verify that this has resolved this issue.

 

 

 

 

E-mail this post to someone or Comments (7)