Recently we tried to upgrade a highly customized CRM 4 install to CRM 2011 and thought it would be worthwhile to list out our findings for the benefit for all.
CRM 2011 supports both in-place upgrade as well as a fresh CRM 2011 install with a later CRM 4.0 organization import into CRM 2011. We attempted the second way, that a fresh install of CRM 2011 and then tried to import the customized organization of CRM 4.0.
If you install the CRM 2011 beta copy and try the import you will receive the following error.
…lead.Address1 Country length 160 more than original value 100…
This appears to be a bug of the beta version that is probably rectified in the CRM 2011 RC released recently.
After a successful install, you can try to import the CRM 4.0 organization, it auto detects that it is an upgrade and would performs all the necessary operations on the database. Make sure you have another backup of the CRM 4.0 in case the upgrade fails mid-way you will need to go back and restore the original copy and start over again.
After a successful upgrade we found the following items we auto-upgraded to CRM 2011 standards by the upgrade tool.
Scripts:
All the scripts written on form save, load and Change will be automatically converted into web Resource and saved as Library with the name Entityname_main .see the display name below.
Select any Web Resource it looks as shown below.
On click of Form properties for any entity you will find that library is already added on the form and it is called on load event with function name.
The code written on the Load event would be put into a function named Form_onload. The OnSave event is changed to function named Form_onsave and Onchange becomes
Attributename_onchange.
Images:
All the Images used in the Custom entities will be saved as Web resource.
ISV buttons:
Any script written on custom button added through ISV in CRM will be converted to Application Ribbons. Buttons of CRM 4.0 are moved to Ribbons in CRM 2011 as shown below.
Plugins:
Plug-in registered in the CRM for entities will be saved as Plug –In Assemblies and Sdk Message Processing
Plug –In Assemblies shows Name ,Version, Culture Public Key Token and the date on which it was created and last modified date.
Sdk Message Processing shows Message, Event Handler, object type code ,Stage and Status
Workflow:
The Workflows would be auto-upgraded as Processes in CRM 2011 as can be seen from the screenshot below
Form Layout
The form layout is carried over as is during the upgrade from CRM 4.0 to CRM 2011. We however found a conflicts tab added to a couple of forms but were unable to trace the controls placed in this section to any of the controls in the original CRM 4 form.
There are sure to be many more items that were upgraded behind the scenes and we will update the list in times to come. However this is a pretty good reference point to start with for a CRM 4 to 2011 upgrade.
Inogic is a hub of like minded professionals who believe in innovativeness and are committed to putting our time and efforts to R & D on Dynamics CRM.We endeavor to share some of our work on this blog by introducing Tips, Tricks and products from our labs.
Tuesday, January 4, 2011
Tuesday, November 30, 2010
Workflows - Behind the scene
We were recently working on designing a tool that deletes workflow job. We thought it would be easy to just filter out all job that related to a workflow by the workflow id and then delete that’s it.
But like always we were in for a surprise. Just thought putting it down would help others in resolving this mystery.
Each Workflow has a unique id just like any other entity. But if you search for workflow jobs using this id to look for all jobs related to this workflow, you would be in for a surprise. It would not return all of the jobs that you are expecting. The reason being each time you revise a workflow i.e unpublish and publish the workflow once again, it creates a new workflow entry in the tables. If you want to look for the workflow jobs related to a particular workflow then you need to look for the workflow id assigned to each of its versions.
For workflow, you would find the following definitions available in the tables.
There will be only 1 definition record in CRM for a workflow no matter how many times you revise it.
But each time you publish a workflow it will create a new activation record.
The activation workflow record will have its parent workflowid set to the workflow definition id.
The workflow definition record will store the id of the currently active version of the workflow.
If you unpublish a worklfow and publish it again, it will add another row to the table and the status would now be as follows:
Note the activeworkflowid of the Definition record now refers the Guid of the latest version of the workflow that is published.
Now if you want to look for system jobs for this workflow, you will need to search for jobs that have their workflowactivationid set to any of the workflowid listed above in the table.
Hope this helps you find your way through the maze of workflows!!!
But like always we were in for a surprise. Just thought putting it down would help others in resolving this mystery.
Each Workflow has a unique id just like any other entity. But if you search for workflow jobs using this id to look for all jobs related to this workflow, you would be in for a surprise. It would not return all of the jobs that you are expecting. The reason being each time you revise a workflow i.e unpublish and publish the workflow once again, it creates a new workflow entry in the tables. If you want to look for the workflow jobs related to a particular workflow then you need to look for the workflow id assigned to each of its versions.
For workflow, you would find the following definitions available in the tables.
There will be only 1 definition record in CRM for a workflow no matter how many times you revise it.
But each time you publish a workflow it will create a new activation record.
The activation workflow record will have its parent workflowid set to the workflow definition id.
The workflow definition record will store the id of the currently active version of the workflow.
If you unpublish a worklfow and publish it again, it will add another row to the table and the status would now be as follows:
Note the activeworkflowid of the Definition record now refers the Guid of the latest version of the workflow that is published.
Now if you want to look for system jobs for this workflow, you will need to search for jobs that have their workflowactivationid set to any of the workflowid listed above in the table.
Hope this helps you find your way through the maze of workflows!!!
Tuesday, November 23, 2010
Debug script in Microsoft Dynamics CRM
In Internet Explorer 8 (IE 8 )Microsoft provided a way to debug the scripts.
With Internet Explorer 8 and JScript Libraries, debugging scripts has become much easier. To debug the script, Please follow the step below.
Hope this helps!
With Internet Explorer 8 and JScript Libraries, debugging scripts has become much easier. To debug the script, Please follow the step below.
- When working with Microsoft Dynamics CRM try to reproduce the conditions where an error is occurring press F12 to open the Internet Explorer developer tools.
- On the Script tab, to the right of the Start Debugging button, use the drop-down to locate your JScript library.
- Set a breakpoint by clicking on the left margin within your function.
- Click Stop Debugging to stop debug.
- If your script is in the Onload event, you may need to select the Microsoft Dynamics CRM window and press F5 to reload the window.
Hope this helps!
Friday, November 19, 2010
CRM 2011 - Dialogs Explored
Dialogs are the new feature addition to CRM 2011.
Just like we had the ability to extend CRM using plugins and workflows, we now have the option of Dialogs as well.
What is different in Dialog?
Dialog runs synchronously like the Plugins but they have the option of providing user interface to accept custom information required for processing.
I took an example of a situation where, you want to add custom logic that will do the following if the user tries to make an Account inactive.
Dialogs let you design a wizard like user interface for user input. In this example we have tried to use all the features that the dialog offers. The aim here is to demonstrate the various features of Dialogs.
Check if it has a parent account associated with it, if so let the user know about it
This can be done through the if condition that was available within workflows as well.
Confirm if they want to de-activate the parent account as well.
Here we shall make you of the Page feature that has been added within dialogs. We shall design a user interface that will ask the user the question and get the Yes/No response back.
For response we have set the type to be Option Set (Radio button). We have defined the values as Yes and No.
This page is then called from the Dialog as the next step
If yes go ahead and de-activate it
We can check the user response to our question in the earlier step and based on that proceed further. Here we have called another Child workflow that is designed to de-activate the account passed to it. The parameter can be passed by selecting the attribute of the Account entity on which the workflow needs to be executed.
Check if the account has Child accounts associated with it, if so let the user know
We need to design a query that will let you search for child accounts.
Here is the trick to designing a parameterized query. When designing the query, user the like condition and specify a dummy name in the query as shown below
There after switch to the Define fetch XML query text tab.
Change the query value to Variable1%. Once you write that, you have the Variable1 showing up on the XML values section. There select the Account Name attribute of the account entity.
This will now search for accounts where parent account = current account.
To see if the query returned results, use the following condition
Disable the Child accounts as well if the users wants
The dialogs do not allow us to loop through the query results and perform action on each of the record found. But it supports calling of Workflows. So the last step is performed by making a call to a workflow assembly.
You can pass the responses received from the user on a page designed in the dialog to the Custom Workflow Assembly.
Dialogs are fun and if put to correct use, it is a very strong tool that has been provided to us.
Just like we had the ability to extend CRM using plugins and workflows, we now have the option of Dialogs as well.
What is different in Dialog?
Dialog runs synchronously like the Plugins but they have the option of providing user interface to accept custom information required for processing.
I took an example of a situation where, you want to add custom logic that will do the following if the user tries to make an Account inactive.
- Check if it has a parent account associated with it, if so let the user know about it
- Confirm if they want to de-activate the parent account as well.
- If yes go ahead and de-activate it
- Check if the account has Child accounts associated with it, if so let the user know
- Disable the Child accounts as well if the users wants.
Dialogs let you design a wizard like user interface for user input. In this example we have tried to use all the features that the dialog offers. The aim here is to demonstrate the various features of Dialogs.
Check if it has a parent account associated with it, if so let the user know about it
This can be done through the if condition that was available within workflows as well.
Confirm if they want to de-activate the parent account as well.
Here we shall make you of the Page feature that has been added within dialogs. We shall design a user interface that will ask the user the question and get the Yes/No response back.
For response we have set the type to be Option Set (Radio button). We have defined the values as Yes and No.
This page is then called from the Dialog as the next step
If yes go ahead and de-activate it
We can check the user response to our question in the earlier step and based on that proceed further. Here we have called another Child workflow that is designed to de-activate the account passed to it. The parameter can be passed by selecting the attribute of the Account entity on which the workflow needs to be executed.
Check if the account has Child accounts associated with it, if so let the user know
We need to design a query that will let you search for child accounts.
Here is the trick to designing a parameterized query. When designing the query, user the like condition and specify a dummy name in the query as shown below
There after switch to the Define fetch XML query text tab.
Change the query value to Variable1%. Once you write that, you have the Variable1 showing up on the XML values section. There select the Account Name attribute of the account entity.
This will now search for accounts where parent account = current account.
To see if the query returned results, use the following condition
Disable the Child accounts as well if the users wants
The dialogs do not allow us to loop through the query results and perform action on each of the record found. But it supports calling of Workflows. So the last step is performed by making a call to a workflow assembly.
You can pass the responses received from the user on a page designed in the dialog to the Custom Workflow Assembly.
Dialogs are fun and if put to correct use, it is a very strong tool that has been provided to us.
Wednesday, November 3, 2010
Displaying CRM emails using SSRS 2008
Email body in Dynamics CRM is stored in HTML format and when we try to display the data as is in the SRS report, it shows up with all the HTML tags.
Microsoft Dynamics CRM reports strip the HTML content and display it in Plain text format.
Now with SSRS 2008, you can display them with part of the HTML formatting. It does not support all the HTML tags as yet, but some basic tags are supported that help provide a presentable view of the email body.
Let’s take an example, we will create sample email as shown below.
To show same content in SSRS report 2008 we need to follow the below steps:
Hope this helps...Time to move on to SSRS 2008!
Microsoft Dynamics CRM reports strip the HTML content and display it in Plain text format.
Now with SSRS 2008, you can display them with part of the HTML formatting. It does not support all the HTML tags as yet, but some basic tags are supported that help provide a presentable view of the email body.
Let’s take an example, we will create sample email as shown below.
To show same content in SSRS report 2008 we need to follow the below steps:
- Place a textbox control on report and within it place the PlaceHolder by right clicking inside textbox and choose PlaceHolder.
- Set the properties of the 'PlaceHolder', change Markup type to HTML.
- Extract description(body) of email by query eg. Select description from filteredemail where activityid='A0773451-3DE3-DF11-9EAB-0003FFD4167C'
- Set the expression value of the placeholder to description, from dataset fields.( For e.g. Fields!description.Value).
- Review the report to see the following result.
Hope this helps...Time to move on to SSRS 2008!
Subscribe to:
Posts (Atom)