Find all workflows where a field is used (Onprem only)

I have a customer with a TON of workflows and custom fields. I needed to figure out everywhere that a field was used in the workflows. After doing some Poking around in the database I created a simple SQL statement that tells me everywhere the field is used. In this case I have a field on the opportunity that I want to find out all of the surrounding workflows that affect it.

 

So I ran this SQL against the database and entered the entity and attribute.

SELECT w.categoryname, w.name, w.statecodename, w.statuscodename FROM FilteredWorkflowDependency AS wd INNER JOIN FilteredWorkflow AS w ON wd.workflowid = w.workflowid WHERE (wd.dependententityname = 'opportunity') AND (wd.dependentattributename = 'hci_allpaymentsreceived')

 

sql1

I now know the two workflows that this field is used in and can go from there.

Posted in CRM 2013, CRM 2015, CRM 2016, Development, Onpremise, SQL, SQL 2005, SQL 2008, SQL 2012, SQL Server | Leave a comment

AsyncOperationBase Table: Here we go again

It never fails, all is going good and then one of our QA environments (on premise) is having Workflow issues. I needed to look into what was happening on the SQL Server to understand what needed to happen. However, the AsyncOperationBase table is not a easy item to understand. I ended up creating a few SQL scripts to help me understand what was happening. Before we go into the scripts, you must understand more of what the table does and what is in it.

From the SDK

The state of the asynchronous operation can be altered through three means: by the platform as part of regular queue processing, by the user interacting with the Microsoft Dynamics CRM Web application, or by a Web service call that alters the asynchronous operation.

The following table lists the states, and the statuses for each state, of an AsyncOperation.

State

Status

Numeric status value

Ready

WaitingForResources

0

Suspended

Waiting

10

Locked

InProgress

20

Locked

Pausing

21

Locked

Canceling

22

Completed

Succeeded

30

Completed

Failed

31

Completed

Canceled

32

So StateCode and StatusCode flag what is happening, but not to what item in the system. That is where the OperationType field comes into play.

Value

Field

Description

1

Event

Specifies a system event.

2

BulkEmail

Specifies a bulk e-mail operation.

3

Parse

Specifies an import file parse operation.

4

Transform

Specifies an operation to transform parse data.

5

Import

Specifies an import operation.

6

ActivityPropagation

Specifies a campaign activity propagation operation.

7

PublishDuplicateRule

Specifies an operation to publish a duplicate detection rule.

8

BulkDetectDuplicates

Specifies a bulk duplicate detection operation.

9

CollectSqmData

Specifies an operation to collect SQM data.

10

Workflow

Specifies a workflow operation.

11

QuickCampaign

Specifies a quick campaign operation.

12

PersistMatchCode

Specifies an operation to update the matchcode.

13

BulkDelete

Specifies a bulk delete operation.

14

DeletionService

Specifies a Deletion Service operation.

15

IndexManagement

Specifies an index management operation.

16

CollectOrgStats

Specifies an operation to collect an organization’s statistics.

17

ImportingFile

Specifies an import subprocess operation.

18

CalculateOrgStorageSize

Specifies an operation to calculate an organization’s storage size.

19

CollectOrgDBStats

Specifies an operation to collect an organization’s database statistics.

20

CollectOrgSizeStats

Specifies an operation to collection an organization’s size statistics.

21

DatabaseTuning

Specifies an operation for database tuning.

22

CalculateOrgMaxStorageSize

Specifies an operation to calculate an organization’s maximum storage size.

23

BulkDeleteChild

Specifies a bulk delete subprocess operation.

24

UpdateStatisticIntervals

Specifies an operation to update statistic intervals.

25

FullTextCatalogIndex

Specifies an operation to generate an organization full text catalog index.

26

DatabaseLogBackup

 

27

UpdateContractStates

Specifies an operation to update contract states.

28

ShrinkDatabase

 

29

ShrinkLogFile

 

30

ReindexAll

Specifies an index management operation.

31

StorageLimitNotification

 

32

CleanupInactiveWorkflowAssemblies

 

38

ImportSampleData

Bottom of Form

These tables helped me understand better how the table is ordered and processed. Each OperationType will have the different statuses mentioned above.

So the SQL Statement to help me see what was happening was the following

SELECT     
	operationtypename, 
	statecodename, 
	statuscodename, 
	COUNT(asyncoperationid) AS cnt
FROM         
	FilteredAsyncOperation
GROUP BY 
	statuscodename, 
	statecodename, 
	operationtypename
ORDER BY 
	operationtypename, 
	statecodename, 
	statuscodename

Which gave me the following results.

Bulk Delete

Completed

Failed

1

Bulk Delete

Completed

Succeeded

23

Bulk Delete

Locked

Canceling

1

Bulk Delete

Ready

Waiting For Resources

1

Bulk Delete

Suspended

Waiting

8

Bulk Delete Subprocess

Completed

Succeeded

18

Bulk E-mail

Completed

Succeeded

1

Goal Roll Up

Completed

Failed

1

Goal Roll Up

Locked

Canceling

1

Import

Completed

Succeeded

3

Import File Parse

Completed

Succeeded

3

Import Subprocess

Completed

Succeeded

6

Recurring Series Expansion

Suspended

Waiting

1

System Event

Completed

Failed

590

System Event

Locked

Canceling

1513

System Event

Ready

Waiting For Resources

10717

Transform Parse Data

Completed

Succeeded

3

Workflow

Completed

Failed

4

Workflow

Locked

Canceling

484

Workflow

Ready

Waiting For Resources

453

Posted in Onpremise, performance, SQL, SQL 2005, SQL 2008, SQL 2012, SQL Server | Leave a comment

ISV Utilities for Comparing Customizations and Transferring Configuration Data

Inna Agranov

Microsoft Corporation

February 2009

Summary

Learn how to build and use two new powerful tools developed for Microsoft Dynamics CRM. The Customization Comparison Utility lets you compare the customization files between two Microsoft Dynamics CRM systems and the Configuration Data Utility lets you transfer custom configuration data from one Microsoft Dynamics CRM system to another.

Download the Visual Studio 2008 and Visual C# code samples for this article:

The Readme.doc files that are included with the sample code contain information about how to set up and build the sample applications. The user guides contain detailed information about how to use the sample applications and view the results. You can find the Readme.doc files and user guides in the project folder for each utility.

Applies To

Microsoft Dynamics CRM 4.0

Microsoft Visual Studio 2008

Introduction

Microsoft Dynamics CRM is a highly customizable system. Not only you can modify different sections of the product, you can also create new components to address business needs. The Microsoft Dynamics CRM platform offers a robust set of tools, APIs, and documentation that helps you build custom business applications. As the applications built on the Microsoft Dynamics CRM platform become more and more complex, a need for specialized support tools grows. In this article you will learn about two very useful tools that help you analyze the impact of customizations on the system and maintain consistent configuration data across multiple Microsoft Dynamics CRM systems.

Evaluating the Impact of Customizations with the Customization Comparison Utility

To evaluate the impact of customizations, it is helpful to compare customization files between the source and the target systems before you import customizations. The Customization Comparison Utility helps you accomplish this task.

Analyzing Customizations

Often you have to export custom components from one Microsoft Dynamics CRM environment and import them into another, for example, from development into test or production. However, before you import customizations, it is very helpful to assess the impact of customizations on the target system. The system where you import customizations may have been changed since the last installation. You have to consider the extent of the changes and how they may affect the new installation. While some of the changes, such as renaming of the attributes or adding new attributes, are minor, other modifications, such as deletion of entities or changes in the forms may have a significant effect on the system.

Analyzing and understanding the system customizations may result in more successful deployment of a new version of the application. This analysis minimizes the risk of overwriting important customization data in the target system. For example, if only several attribute names have changed, you may be able to do a plain import using the import/export functionality built into Microsoft Dynamics CRM. However, if some key components were deleted, such as entity forms, you may have to merge the customizations with the changes in the target system. Comparing customization files between the two systems helps you determine which approach will result in more successful deployment. This is also very useful when you are diagnosing the problems between two systems. By comparing the customization files, you can often identify possible causes of the existing problems.

Using the Customization Comparison Utility

The Customization Comparison utility lets you easily compare two Microsoft Dynamics CRM customization.xml files. Unlike other XML comparison tools, this utility can read and understand Microsoft Dynamics CRM schema. The results of comparison show the differences in entities, attributes, forms, views, workflows, security roles, entity maps, and relationships. You can use this tool before you import customizations into a system to evaluate the effect they will have on the system.

Use the tool to compare XML customizations files between the source and the target systems. If you use a zipped customization file, make sure that it contains only one customization XML file. The following illustration shows the results of comparison between two customization files. The compared items include entities, roles, workflows, entity maps, and relationships. You can drill down into each item to see more details. From the entities, you can view the changes in attributes, forms, and system views. You can easily see the changes in source and target. It shows the items that are present in the source file and not present in the target file and the items that are present in the target file, but not in the source file.

Dd442453.a7338331-120b-4f29-ab17-1c94b85e014b(en-us,MSDN.10).gif

In addition to reviewing the results of the comparison in the grid, the tool includes a report that you can easily export to Microsoft Office Excel for additional analysis.

For more information about how to use the tool, see the Customization Comparison user’s guide included in the download package for this utility.

Transferring Configuration Data with the Configuration Data Utility

When you work with multiple environments, such as development, test, and production, or multiple Microsoft Dynamics CRM organizations, keeping consistent configuration data across all systems can be very important. The Configuration Data Utility helps you achieve this. It lets you export custom configuration data from a source Microsoft Dynamics CRM system and import it to a target Microsoft Dynamics CRM system.

Storing Configuration Data in Custom Entities

In Microsoft Dynamics CRM you often use custom entities to store business information. However, you could also use custom entities to store system configuration data. For example, if an application integrates Microsoft Dynamics CRM with a third-party system, you could create a configuration entity with attributes such as pollingtime, url, and retries to store the configuration data needed for the integration. This is very convenient because the data stored in the configuration entity can be used by the system administrators to configure a new application or update an existing application. To keep the configuration data up to date, you may have to frequently upload the new data, or have an automated task to do it.

Using the Configuration Data Utility gives you a simple and efficient way to transfer custom configuration data from one system to another. One of the main benefits of this utility is that you can import configuration data from multiple custom entities at the same time. While it only imports and exports data for custom entities, the tool can handle useful scenarios, such as importing records that reference other records that are also being imported.

Dd442453.Important(en-us,MSDN.10).gifImportant

For the tool to work correctly, the schema for the source entities and the target entities must be identical.

Dd442453.note(en-us,MSDN.10).gifNote

In more complex cases, use the Microsoft Dynamics CRM data export and import tools or Data Migration Manager to transfer data for custom and system entities.

For more information about these tools, see Microsoft Dynamics CRM online Help.

Using the Configuration Data Utility

Use the Configuration Data Utility to export the source system configuration data and import it into a target system. The tool provides a convenient interface that lets you select the custom entities that contain the configuration data in the source system, save the data into a data file, and then import the records from the data file into a target system.

To run the tool, you must be a system administrator with appropriate privileges to create, read, and update entity instances.

The following illustration shows the entities in the source system that are selected for export.

Dd442453.0b8f0a81-1a17-4d77-9419-1cdc12427223(en-us,MSDN.10).gif

For import, specify the target server where you import the configuration data and the data file that you created during export, as shown in following illustrations.

Dd442453.9436a94c-f84f-4151-8d85-edc09ecaa422(en-us,MSDN.10).gif

Dd442453.5841695f-63ff-4ebb-a3b4-143657a9f759(en-us,MSDN.10).gif

The tool offers a command line version that you can run from a command prompt.

For more information about how to use the tool, see the Configuration Data Utility user’s guide included in the download package for this utility.

Additional Information

Download the Microsoft Dynamics CRM 4.0 Software Development Kit (SDK) from the Microsoft Download Center.

For more information about custom entities, see Entity Customization.

Posted in Uncategorized | Leave a comment

Buy vs Build

Jonas Deibe – Dynamics CRM, C#, JS wrote this


Buy versus build judge yourself! I would think xRM as a way of accelerate application development.

 

Costs

Benefits

Buy (xRM)

Locked to vendor

Locked to vender schedules

Customizations to fill GAPs (if any)

Licenses

 

 

Configuration more than development

Faster go to market

Use vender enhancements

“Standard”

Shop GAP’s as modules or vertical solutions

Build (.Net or any other langauges)

Expensive

Longer delivery cycles

Harder to rapidly change

Innovation

Tailor application bit by bit

Re-use existing infrastructure

Better control over developer process

 

Checkout the introduction to xRM for some inspiration http://www.youtube.com/watch?v=Yru5CkANOKA

Published Monday, August 31, 2009 8:19 AM by Jonas Deibe

Posted in Uncategorized | Leave a comment

Buy vs Build

Jonas Deibe – Dynamics CRM, C#, JS wrote this


Buy versus build judge yourself! I would think xRM as a way of accelerate application development.

 

Costs

Benefits

Buy (xRM)

Locked to vendor

Locked to vender schedules

Customizations to fill GAPs (if any)

Licenses

 

 

Configuration more than development

Faster go to market

Use vender enhancements

“Standard”

Shop GAP’s as modules or vertical solutions

Build (.Net or any other langauges)

Expensive

Longer delivery cycles

Harder to rapidly change

Innovation

Tailor application bit by bit

Re-use existing infrastructure

Better control over developer process

 

Checkout the introduction to xRM for some inspiration http://www.youtube.com/watch?v=Yru5CkANOKA

Published Monday, August 31, 2009 8:19 AM by Jonas Deibe

Posted in Uncategorized | Leave a comment

The Microsoft Dynamics CRM Developer Toolkit

For CRM developers, aligning the engineering delivery and process quality of their CRM projects can substantially increase overall productivity. In addition, by documenting, communicating, and following a consistent process for implementing CRM in Enterprise scenarios, developers can scale projects more quickly and efficiently by adding and ramping up consultants regardless of their previous experience with any specific project.
To provide developers with the ability to create and manage on-premise CRM solutions in an integrated Visual Studio environment, the Microsoft Dynamics CRM Engineering for Enterprise (CRM E2) team initiated and sponsored the development of the Microsoft Dynamics CRM Developer Toolkit. The Toolkit has been designed to make it easier for developers to customize, extend, and maintain an on-premise CRM solution, all from within an integrated Visual Studio environment. Key benefits for developers include the ability to:

  • View All CRM Entities – Displays a listing of CRM entities that are dynamically available from the CRM Explorer within Visual Studio 2008
  • Create and Update CRM Entities – Allows for creating new entities and updating existing entities from within the CRM Explorer experience
  • Create a Wrapper Class – Provides the ability to auto-generate wrapper classes for entities, which exposes the CRM entities and their corresponding attributes as classes and properties respectively to enable development of code to interact with the entities
  • Generate Plug-in Code – Enumerates the available Plug-ins for an entity and generates the code necessary to jumpstart the plug-in development process
  • Integrate the Build and Deploy Process – Simplifies the process of building and deploying a CRM solution
  • Deploy Across Multiple Servers – Assists in deployment and maintenance of Windows installer packages across multiple environments

Important: CRM DevToolkit Installers v1.1 (released on 04/16/09) addresses the following minor issues, which were discovered in the initial release of the CRM Solution Framework:

  • The code-generated RetrieveDynamicEntity did not work on any derived classes because it did not know which entity to reference.
  • A static field returned the same ID for any (and every) instance of any entity type (i.e. creating 5 phone calls and retrieving the ID of the record and resulted in the same ID).

 

Check it out here

Posted in Uncategorized | Leave a comment

It’s baaa-aaack! For a Limited Time – The Big Easy 3.0!!

Great news for Microsoft CRM partners and customers; from November 1st, 2009 through January 2nd, 2010 you can take advantage of one of our most popular promotions ever.  Applicable to Open, Open Value and Open Value Subscription license types, both Corporate and Government customers are provided with partner subsidy funds to help with the implementation of their Microsoft solution.  The following product groups are included:

The Big Easy Offer 3.0 Product Groups:BEO3_logo_o

  • Developer and Designer Tools
  • Dynamics CRM
  • Exchange Server
  • Forefront
  • Office Communications Server
  • Office System
  • Project and Visio
  • SharePoint Server
  • SQL Server
  • System Center
  • Windows Server System
  • Windows Server Solutions

Get more details here: https://partner.microsoft.com/US/bigeasyoffer   A Windows Live ID linked to your partner organization is required.

Posted in Uncategorized | Leave a comment

Microsoft Dynamics CRM Adapter for Microsoft Dynamics GP Released!!

East Region Microsoft CRM

After months of hard work, a very successful Partner TAP (Technology Adoption Program) as well as a Customer BETA program, this adapter has released and is generally available for US installs of Dynamics GP 10.0 and CRM 4.0.

This is an entirely new adapter redesigned from the ground up to utilize web services and eConnect and provides “…an out of the box, lightly extensible data integration tool.”  The adapter will be offered to registered Microsoft Dynamics GP Partners at no charge, though it must be ordered through the standard Microsoft Dynamics GP ordering process so we can keep track of who is using the adapter and will therefore want any updates and additional information.

Here are the main points:

Easy to Implement

· Wizard driven installation

· System Preparation Tool

· Lightweight footprint that utilizes web services and eConnect

-Web Service to web service integration

Easy to Use

· Eight out-of-the-box CRM to ERP Mappings

Easy to Customize

· Wizard driven custom mapping

Additional Information Regarding the Adapter:

For Partners and Microsoft Team Members (Information will be updated as it is available):

https://mbs.microsoft.com/partnersource/partneressentials/partnerreadiness/resourcing/MDCRMGPAdapter.htm

For Existing Customers (Information will be updated as it is available):

https://mbs.microsoft.com/customersource/worldwide/us/productinformation/factsheets/MDCRMGPAdapter

The first Partner Readiness training class is tomorrow; register at the link below:

https://training.partner.microsoft.com/learning/app/management/LMS_ActDetails.aspx?UserMode=0&ActivityId=551516

Posted in Uncategorized | Leave a comment

New Update to the Dynamics CRM Statement of Direction now available!!

Hot off the presses we now have access to the freshest information on Dynamics CRM, Mobile Express, CRM Accelerators, the CRM Adapter for GP, xRM and the highly anticipated release of CRM “V.next.”

What an edge-of-your-seat thrill ride!  Sure to be a best-seller – OK, it’s free – but I couldn’t put it down!  Make sure to get your copy today at these fine outlets:

PartnerSource:

https://mbs.microsoft.com/partnersource/marketing/statementofdirection/MD_CRM_SOD.htm

CustomerSource:

https://mbs.microsoft.com/customersource/documentation/whitepapers/MSD_CRM4StatementOfDirection

Posted in Uncategorized | Leave a comment

CRM, Performance Point and MOSS (CRM+PPS+MOSS)

Jonas Deibe – Dynamics CRM, C#, JS


Extending CRM with BI capacity has been on the radar for a while and with the new BI accelerators this will be an easy customization. The same applies to CRM and MOSS integrations. Since I have spent some time in this very interesting area I tough why not share some parts (screen captures). My goals was to build an application with Sales support (CRM) extend it with document management/collaboration (WSS/MOSS) and analyses, drilldown reporting plus dashboards (PPS)

The end application would be fully integrated and user navigation will be from the CRM client. Since its all installed on-premise authentication is single sign on (SSO). One very important goal is to let the end user not to know what underlying product she is using, it just doesn’t matter as long it works and supports the end-users business/processes.

The first step to do is to install the software. I use two servers and a client in my lab.

• Installation domain controller and Exchange (Server1)

• Installation SQL Server, AS for OLAP’s, Reporting Service (default port 80), CRM server (port 5555), MOSS Server (random port NOT default web 80), Performance Point Server (Monitoring), Visual studio (Server2)

• Installation of Client with Office package, Visual Studio (Client)

The installation process might take some time so don’t expect to install it all on an afternoon.

Details on how-to configure each product is not in scope of the blogs post (might be a later post)

The end result is a very powerfull application; below you see some screen shoots

Dashboard - Click to enlarge

CRM Webclient, Sharepoint site and PPS webparts rendering Dashboards from OLAP cube

Sharepoint Document Library

Sharepoint Document Library. Context menu about to open workflows on current document.

Drill down to product from opportunities, all depending how the cube has been designed

PerformancePoint Monitoring SDK

http://msdn.microsoft.com/en-us/library/bb848116.aspx

Working with Online Analytical Processing (OLAP)

http://msdn.microsoft.com/en-us/library/ms175367.aspx

MOSS Developer center

http://msdn.microsoft.com/en-us/office/aa905503.aspx

CRM 4.0 sdk

http://msdn.microsoft.com/en-us/library/aa477293.aspx

Published Tuesday, October 21, 2008 10:00 PM by Jonas Deibe

Posted in performance | Leave a comment