Scratching your head over why your custom ribbon buttons are not visible or not working as expected–The wonderful Command checker tool from Microsoft might just save your day.

Debajit's Dynamic CRM Blog

If you have ever worked in Dynamics 365 implementation then it is almost certain that you must have played around with ribbons. And more often than not you must have faced scenario where you have multiple enable and display rules on the form and not sure why the ribbon button is showing up on the form when it is supposed not to show up or vice versa.

And what we do to resolve it. Well, we play around with the ribbon customizations which takes much more time than other customizations in Dynamics 365. And if it is some custom rule, we would attach debuggers to our custom code and debug and find what is going wrong.

What if I tell you that Microsoft just released something which shall help you identify which of your ribbon rule is evaluating to what in a matter of few mins so that you can…

View original post 441 more words

Performance issue while migrating activities

In this post I am going to explain how did I solved the performance issue while migrating activities using SSIS packages. My approach to migrate the data is, export the CRM data to Staging DB by using “Data Export” services and then to CRM by using SSIS packages. We all know that we have to migrate the party list (from,to,cc,bcc etc.,) data as part of activities migration and we need to write either SQL functions / script component to migrate party list data. I opted for SQL functions and I used those functions in SQL view. For ex, in email view I have to call 4 functions for each record to transform the data in party list fields (from, to, cc, bcc). So it leads to huge performance issue while fetching the data from staging table.

After a bit of research, I realised that I don’t have index for my intermediate tables. So I immediately created the following indexes.

  1. Index for “activityid” and “participationtype” fields on “activityparty” table
  2. Index for “activityid” on “email” table

and here is my SQL Function

CREATE function [dbo].[GetPartyListForEmail] (@activityid uniqueidentifier, @partyType int)
RETURNS nvarchar(max)
AS
BEGIN
	DECLARE @partyList nvarchar(max);
	DECLARE @partyid as uniqueidentifier;
	DECLARE @logicalname as nvarchar(100);
	DECLARE @getPartyList nvarchar(max);
	 
	DECLARE db_cursor CURSOR FOR SELECT ap.PartyId,ap.partyid_entitytype 
	FROM email em 
	LEFT JOIN activityparty ap ON ap.ActivityId = em.ActivityId
	WHERE ap.ParticipationTypeMask = @partyType AND em.ActivityId = @activityid;

	OPEN db_cursor
	FETCH NEXT FROM db_cursor INTO @partyid, @logicalname
		WHILE @@FETCH_STATUS = 0
			BEGIN
				IF @logicalname = 'systemuser'
				BEGIN
					SET @partyid = (SELECT TargetUserId FROM mapping_systemuser WHERE SourceUserId = @partyid)
				END

				IF @partyid IS NOT NULL
				BEGIN
					SET @partyList = Concat(@partyList, @logicalname);
					SET @partyList = Concat(@partyList, ':');
					SET @partyList = Concat(@partyList, @partyid);
					SET @partyList = Concat(@partyList, ';');
				END
				FETCH NEXT FROM db_cursor INTO @partyid, @logicalname
			END

	IF (LEN(@partyList)) > 0  
	BEGIN
		SET @partyList= left (@partyList, len(@partyList)-1)
	END

	RETURN @partyList;
END

After adding the indexes, I experienced huge improvement and processed 230k records in 2 hours.

Hope it helps…..

ReviseQuoteRequest: The quote cannot be revised because it is not in closed state

I used “ReviseQuoteRequest” SDK method in one of the plugin to revise the quote. When you revise a quote from UI, first it will close the existing quote and then create a revised version of this quote. So I expected that “ReviseQuoteRequest” also do the same, but I got the “The quote cannot be revised because it is not in closed state” error when I am using the SDK method. After a bit of research, I understood that we have to Close the quote before revise it. So I closed the quote by using “CloseQuoteRequest” and then “ReviseQuoteRequest” which solved my issue. But my suggestion that SDK method should handle the close quote request also internally. Please let me know your thoughts on it.

Customization of Case Resolution dialog is possible with Release wave 1

There are many features available with Dynamics 365: 2020 Release wave 1. Click here to go through the release plan.

One of the interesting feature, it is now possible to customize the case resolution dialog. We have 3 styles available with the new release.

  1. Standard dialog: This option is default out of box case resolution dialog.
  2. Customizable dialog: You can customize the case resolution dialog with this option by adding or removing fields on Main Form of Case Resolution entity.
  3. Quick create dialog: Quick create form will open if you select this option and you can customize the Quick create Form of Case Resolution entity.

You can also create the business rules under the case resolution entity to apply form validations.

Hope it helps…….

Undeclared Property error while migrating lookup data using KingswaySoft adapter

I am using KingswaySoft adapter to migrate the data between MS CRM instances. I am using WebAPI endpoint in the connection string due to the fact that SOAP endpoint is deprecated. But I encountered an issue while writing the data into custom lookup fields and the package is failing with the below error.

An undeclared property ‘aw_accountid’ which only has property annotations in the payload but no property value was found in the payload. In OData, only declared navigation properties and declared named streams can be represented as properties without values.

Reason:

KingswaySoft adapter making WebAPI calls to create records in MS CRM since I selected WepAPI endpoint in my connection string. But with WebAPI calls, we have to pass entity schema name also to migrate the lookup data and KingswaySoft adapter has no option to pass this data.

Solution:

Unfortunately, there is no solution at the moment. I contacted KingswaySoft support team and this is the response I got it from them.

As you have already seen, the issue that you have experienced is a limitation on WebAPI, and from the cases we have seen it mainly happens to custom fields. This limitation is documented in our software. We recognize this is a blocking issue, so we recommend to not use WebAPI for the time being until the issue is addressed by Microsoft – we did highlight a number of other issues with WebAPI in our software tooltip in the connection manager. As of now, SOAP is still available and is highly reliable than WebAPI.

So, I solved this issue by changing the endpoint to SOAP in the connection string. Hope Microsoft is working on this issue and will solve asap.

Multiple Organizations issue for the FetchXML reports in Visual Studio

I faced the below issue with connection when trying to run the fetchxml based reports in visual studio. The issue didn’t resolved even after the organization name specified in the connection string.

Cause: It is because of change in TSL support, Microsoft supports only TSL 1.2 going forward.

Solution: Create a new DWORD in registry of the machine where VS is running.

  1. Open registry editor (Run –> regedit)
  2. Navigate to this path “HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft.NETFramework\v4.0.30319”
  3. Right click on v4.0.30319 folder, select New and then DWORD (32-bit ) value
  4. Provide the values like below
    • Value name: SchUseStrongCrypto
    • Value data: 1
  5. Exit from the registry editor and restart the machine

That’s it, now you can run the fetchxml based report from VS without having any problems. Hope it helps you to resolve this issue.

All about Reference Panels

It’s always a customer requirement to see as much as information possible with out too much scrolling on the form. Now it is possible with Reference Panels, it’s basically concept of tabs inside a tab. With the reference panels, you can place multiple sub grids or quick view forms inside a tab. Let’s see how to do this.

  • Open a Form Designer and then Insert tab
  • Insert One Column tab on the Form and name it as “Reference Panels”
  • Click on “Section” and select “Reference Panel”
  • It will insert a new Section in the tab.
  • Add your sub grids or quick view forms in this section. I added 2 sub grids and 1 quick view form.
  • Save and Publish

This is how it would look like after Publish. Select the buttons in the right hand side to change between the sub grid and quick view forms.

Hope it will help to add plenty of information as per customer need.