Monday, November 04, 2013

Microsoft CRM 2013 - Integration with BingMaps: difference between OnPremise and Online instances

Difference I faced today is following – OnPremise instance has Bing Map api key field in System Settings but Online doesn’t.

OnPremise:
OnLine:
 

Thursday, October 31, 2013

Microsoft CRM 2013: Adding standard Bing Map control to forms of custom entities

In CRM 2013 Microsoft released really great feature – OOB integration with BingMaps. Unfortunately list of entities that support BingMaps control is limited to Account, Contact, Lead, Quote, Order, Invoice, Competitor and System User.
I did small investigation how this control is organized and I can confirm that it is possible to add OOB Bing Maps control to forms of custom entities. But be careful -  provided solution is 100% unsupported but doesn’t require any knowledge of development, JavaScript, HTML and so on.

Actions: usage of input/output arguments in plugins that handle Actions

Main message is that input/output arguments are available in InputParameters/OutputParameters collections of PluginExecutionContext.

Usage of Input argument
Following code shows how to check that Input Argument was passed and get value:

if (localContext.PluginExecutionContext.InputParameters.Contains("ArgumentName"))
{
    string stringInputArgument = (string)localContext.PluginExecutionContext.InputParameters["ArgumentName"];
}
else
{
    //Your code for case when Argument was not passed
}

Usage of Output argument
Following code shows how to set Output argument:

localContext.PluginExecutionContext.OutputParameters["OutputArgumentName"] = <Value>;

One thing you should remember is that step that handles your action and sets Output arguments had to be registered on Post Operation (40).

For those who use CRM Developer Toolkit – registration of new plugin, registration of your step in code of your plugin and part of RegisterFile.crmregister file:


base.RegisteredEvents.Add(new Tuple<int, string, string, Action<LocalPluginContext>>(40, 
    "MessageName", null, new Action<LocalPluginContext>(PluginClass)));

<Step CustomConfiguration="" Name="StepName" Description="Description" Id="024c3b93-6041-e311-ad38-6c3be5a8d218" 
    MessageName="MessageName" Mode="Synchronous" PrimaryEntityName="none" Rank="1" SecureConfiguration="" 
    Stage="PostOutsideTransaction" SupportedDeployment="ServerOnly">

For those who use PluginRegistration tool:

Monday, October 28, 2013

Actions, input parameters and “Object reference not set to an instance of an object” exception

During playing with Actions I wrote simple .Net code that invoked execution of an Action:
slick_CustomActionsTestRequest request = new slick_CustomActionsTestRequest()
{
    BoolInArgument = true,
    DateTimeInArgument = DateTime.Now,
    DecimalInArgument = decimal.Zero
};

slick_CustomActionsTestResponse response = service.Execute(request) as slick_CustomActionsTestResponse;

During testing I have got really weird and unclear error – “Object reference not set to an instance of an object.”:

Sunday, October 27, 2013

CRM Developer Toolkit for Microsoft Dynamics CRM 2013 - Visual Studio 2012 Crashing

After CRM 2013 was released I decided to install CRM Develoepr toolkit for CRM 2013 on my workstation. After I tried to create CRM Package solution I have got following error and VS crashed and restarted:

Microsoft Dynamics CRM 2013: Actions: deployment of plugins through CRM Developer Toolkit

I played with new version of CRM Developer Toolkit and was not able to find a way to register plugin that handles action using UI. Following post describes workaround how make it possible.

Microsoft Dynamics CRM 2013: Actions walkthrough for .Net and JavaScript developers

I believe that almost every developer for Dynamics CRM faced with scenario when he/she had to invoke some complex logic on a server side, pass parameters and receive a response back. Before CRM 2013 we used workarounds similar to this one. Once Dynamics CRM 2013 was released we have got solution that would not require ‘magic’.

Saturday, October 12, 2013

How to turn on Duplicate Detection for client side in Microsoft Dynamics CRM 2013

Microsoft decided to remove Duplicate Detection feature in 2013 version. Why? Not sure.
Following article describes how to restore this functionality.

Saturday, October 05, 2013

Microsoft Dynamics CRM 2013 is now available online

Steps to get:

1. Open following link - http://www.microsoft.com/en-in/dynamics/crm-free-trial-overview.aspx
2. Click Try it free button.
3. Choose India as a country.
4. Process all required steps.
5. At the end you will get instance of CRM 2013 Online.

Prove:

 

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:

DynamicsWorld 2013 Most Influential Microsoft Dynamics People List – Results

Today I found results of subj voting and it was a good surprise for me that I was listed even with worth position (last year I was 74 comparing 98 this year). Congratulations to all participants of voting who was listed!

Thursday, April 11, 2013

The Top 100 Most Influential People in Microsoft Dynamics Voting for 2013

Because of vacation at Philippines combined with work and weak Internet connection I totally forgot about subj online voting. I was surprised that someone nominated me to participate it (thank you unknown fellow). So if you think that me or other nominees have influence on Dynamics products don't hesitate to vote and leave your comments using following page - http://www.dynamicsworld.co.uk/the-top-100-most-influential-people-in-microsoft-dynamics-voting-for-2013/

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)

Wednesday, March 06, 2013

Review of book - Microsoft Dynamics CRM 2011 Application Design



This book was written with my CRM MVP and forum fellow Mahender Pal.

I read this book in a single breath and I can assure that this book would be helpful for both beginners and veterans of Microsoft Dynamics CRM world.

Chapter 1 describes common information about CRM - what is it, different deployment options, clients that could be used to work with CRM, software and hardware requirements and out-of-box modules.
Chapter 2 describes basic customization that is available in CRM.
Chapter 3 describes automation points that could be used in CRM without involving of developer into the project - dialogs and workflows.
Chapter 4 gives understanding how CRM business logic could be extended using plugins - serverside triggers that react on different system events.
Chapter 5 gives understanding how developers can extend client side scenarios.
Chapter 6 provides information how external applications can interact with CRM using endpoints in different deployment models.
Chapter 7 provides the description of Mobile Client for CRM.
Chapter 8 shows different basic scenarios that you can face with during implementation of CRM.

I highly recommend to read this book from author who has deep knowledge of all the aspects of implementation of CRM.

In case you are interested in this book please use following urls for accessing:

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.

Thursday, January 17, 2013

New badge – MCC


Today I have got an email from Microsoft that notified me that I’ve got MCC award. It’s funny because I thought that in case you hold MVP award that you can’t get MCC. It seems that I was wrong.
So now I’m listed here at the page number 4.
That's how my profile of forums looks now:

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, January 03, 2013

MVP Renewed - 3

Four year in a row I have got MVP award. Congratulations to all MVP's who has got award first time or was re-awarded.