Showing posts with label Microsoft CRM 2011. Show all posts
Showing posts with label Microsoft CRM 2011. Show all posts

Thursday, January 09, 2014

Microsoft CRM 2011/2013: Colorizing Service Calendar

This is how standard service calendar looks like:

Today I was asked with customer is it possible to change colorizing schema of Service Calendar. I started to look for information about it and found following article - http://msdn.microsoft.com/en-us/library/gg309501.aspx
Unfortunately I was not able to understand now to make it from first attempt and I contacted Microsoft to get some clarification and help. I’m really appreciated to Jim Daly who got in touch with me and gave some explanations regarding SDK article. I will share with results I've got in this article.

Wednesday, June 19, 2013

Update of Latitude/Longitude fields using BingMaps services through SSIS Integration Toolkit

During current project I have got task to update Latitude/Longitude fields of all account records based on their address. I’ve done similar tasks several times but this time I decided to create SSIS package that could be reused in future projects. So in this article I will share with my results.

Tuesday, May 07, 2013

Microsoft Dynamics CRM 2011: Lookup address by ZIP Code

This time I had task to write code that lookups address details (country, state and city) by entered postal code. I will share with my results in this post.

Microsoft Dynamics CRM 2011: Error after applying Update Rollup 12/13

I haven’t updated my VM to latest updates for a long time and I decided to do that today. After Rollup was installed I saw message that Rollup was not applied to one or several organizations. I ignored that message and tried to log in to CRM. I have got following error:

Monday, April 01, 2013

Microsoft Dynamics CRM 2011: How to send SMS from CRM

I have completed this task for one of customers so I decided to share with results.

Wednesday, March 13, 2013

Activity Feeds and Exceptions or How to fix something that should work

During work I found following logs in event viewer:

Exception information: 
    Exception type: CrmException 
    Exception message: Could not find a web resource with name Images/refresh.png.
   at Microsoft.Crm.Application.Components.Handlers.WebResource.RetrieveWebResource(String webResourceName, String preview)
   at Microsoft.Crm.Application.Components.Handlers.WebResource.ProcessRequestInternal(HttpContext context)
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Monday, February 18, 2013

Migrating contacts and accounts from Goldmine to Microsoft CRM 2011

I just finished a project where I had to migrate data from Goldmine to Microsoft CRM 2011 so I decided to share with my results.

Monday, January 21, 2013

MS CRM 2011: Rollup 11 and ‘CrmException: A non valid page number was received: 0’ error

I installed Rollup 11 on our development servers and after server restart CRM instance was broken. Every page that has grid or grids shown following:



I googled and found following solution:
1. Open regedit.
2. Open HKLM\SOFTWARE'\Microsoft\MSCRM.
3. Open TurnOffFetchThrottling key and change value to 0.
4. Make iisreset.
Once steps were done CRM instance was fixed.

MS CRM 2011: Add new Deployment Administrator through SQL

Here is just short script that has to be executed against MSCRM_Config db to add new deployment administrator:

Declare @DomainName Varchar(Max)
Set @DomainName = 'Put new deployment admin login here'--i.e. 'Contoso\Administrator'

Declare @Id uniqueidentifier
Select @Id = Id From mscrm_config..SystemUser Where Name = @DomainName

if (@Id is null)
Begin
    Set @Id = NEWID()
    INSERT INTO mscrm_config..SystemUser(Id, Name, DefaultOrganizationId) 
    VALUES(@Id, @DomainName, '00000000-0000-0000-0000-000000000000')
End

INSERT INTO mscrm_config..SystemUserRoles(Id, SecurityRoleId, SystemUserId) 
VALUES(NEWID(), (Select Id From mscrm_config..SecurityRole Where Name = 'Administrator'), @Id)


So the only thing you need to do is to put domain name of new deployment administrator in a format DOMAIN\Login like Contoso\Administrator.

This trick is 100% unsupported and can lead to malfunction of whole CRM deployment. I suggest you to take backup of MSCRM_Config DB before you run this script.

Friday, January 18, 2013

Customer Portal – switching authentication from LiveId to Forms

I have got a requirement from one of customers create customer portal. It was my first experience with portals so I decided not to build custom website but to install and configure Customer Portal. I would not write how to install and configure this solution – it is well described. Once it was configured I had a phone conference with customer and first requirement and main challenge for me was to remove LiveId authentication and replace it with other authentication.

Monday, January 14, 2013

MS CRM 2011: Replacement of textbox with picklist with configurable values

During the work with CRM 4.0 I used this trick to solve similar tasks. Today I had to implement similar functionality and I decided to go supported way – JavaScript + WebResources.

Sunday, January 13, 2013

MS CRM 2011: How to override standard dialogs

My customer wanted to remove (or hide) “Total Time” and “Billable Time” fields in Case Close dialog window:


Of course I knew that it is possible to open file CRM_Installation_Directory'\CRMWeb\CS\cases\dlg_closecase.aspx, add several lines of code and hide fields and labels but this obvious and easiest way out had 2 disadvantages:
1. This solution is unsupported and it could be broken with new Rollups.
2. This solution would not work for CRM Online.
So I decided to solve this task using supported approaches.

Thursday, January 10, 2013

MS CRM 2011: Open new activity form with ‘Regarding’ field prefilled

I had a task today to open new task form with Regarding field prefilled. Based on SDK description I tried to use following code to accomplish my task:

var params = {
    regardingobjectid: referenced record id,
    regardingobjectidtype: referenced record type name,
    regardingobjectidname: referenced record display name
};

Xrm.Utility.openEntityForm("task", null, params);

Unfortunately this code failed. I’ve started to look for some explanation and I found it in SDK at the same article I’ve mentioned before. Answer was that it is impossible to set values for partylists and regarding lookups.
I knew that this feature works for out of box buttons so I rechecked URL for activities that are created with OOB buttons and reworked code to following which worked without issues:

var params = {
    pId: referenced record id,
    pType: referenced record type code,
    pName: referenced record display name
};

Xrm.Utility.openEntityForm("task", null, params);

Thursday, December 20, 2012

MS CRM 2011: How to cancel/postpone Workfow Instance using C#

Today I had a task to cancel about 25k instances of the same workflow. Of course it was possible to create Advanced Find View and go through 100 pages cancelling all workflows on the page. But I’m too lazy and I know C# to do that manually.

Tuesday, November 13, 2012

Integrating CRM 2011 using SQL Integration Services 2012

I have already wrote similar article using SSIS 2008. Following article describes how to use the same functionality using new version of SSIS.

Friday, November 09, 2012

MS CRM 2011: T-SQL Union operation and FetchXml based reports

I believe every person who developed complex reports for CRM used T-SQL Union operation to display different types of records at the same table.

In T-SQL I used following T-SQL Query to get results:
Select
    AccountId RecordId
    ,Name RecordName
    ,'account' RecordTypeName
From FilteredAccount
Union
Select
    ContactId RecordId
    ,FullName RecordName
    ,'contact' RecordTypeName
From FilteredContact

And results were:

When CRM 2011 was released we got possibility to create reports for CRM Online but it is limited to usage of FetchXml reports that doesn’t have Union operation. Following article describes workaround.

Monday, November 05, 2012

MS CRM 2011: ‘Publish report for external use’ functionality brakes subreports

Today I faced with this issue. I published standard ‘Quote’ report for external use tried it and it didn’t worked. I got following message once I tried to run a report:

Thursday, November 01, 2012

MS CRM 2011: How to refresh Associated or SubGrid from Ribbon button

Today I have got requirement – create custom ribbon button placed to Associated View of entity, execute some logic and invoke refresh of grid. Last point was the trickiest one and that’s why I decided to share with approach how to do it.

Friday, October 05, 2012

Tool that increases limit of record during export to Excel for Dynamics CRM 2011

One of my customers wanted to increase this limit. I made small investigation and discovered that setting that controls limit of records is stored at Organization entity in MaxRecordsforExportToExcel column. The easiest way to change this setting for On Premise of course was to Update directly OrganizationBase table but customer’s CRM is OnLine. So I developed small tool that allows to connect and update this setting using CRM Sdk.

Friday, September 07, 2012

MS CRM 2011: How to check user rights on client side

Today I have got requirement to write function which will validate rights of user. In our specific case we had to show/hide buttons on custom web form. I decided to post results of my work here.