Search This Blog

Wednesday, December 15, 2010

Tools Update: IsvConfigManager and FormJavaScriptManager

That will surely be the last update for these tools (unless you discover a bug Sourire).

Isv Config Manager changelog:

  • Remove publishing feature (Isv.config doesn’t require publish)
  • You can now add button without Title element
  • Add Expand/Collapse feature
  • Add Read/Write Xml feature : You can now see what is the corresponding Xml for a treeview element. You can also add a treeview element by pasting xml content.

See the capture of these new features :

NewIsv

Form JavaScript Manager changelog:

  • Ability to load script files from a directory AND all its sub directories
  • When opening again the folder browser, it starts from the current selected folder

As usual, you can download these new versions using the right hand pane of this blog.

EDIT: I didn’t let you the time to discover a small bug when inserting xml content into a treeview element, so don’t ask me, just download the tools again…

Tuesday, December 14, 2010

Advanced Find Search: Where is this damn N:N relationship???

Did you ever have this feeling that something should behave in a way and you can’t figure out why this does not…?

I faced this feeling recently regarding the advanced find search. Here is the scenario: I created a N:N relationship between the account entity and a custom entity called Technology. As this relationship was just a “technical” one, I decided to hide left hand menu for this relationship. Below screenshots were taken for entity “test”.

NN1

“Ne pas afficher” means “Do not display”

When I then needed to perform an advanced find search on account related to a specific technology, I wasn’t able to select the N:N relationship in the list of relationships. I even thought that it was perhaps a normal behavior for N:N relationships (yeah, I know, that”s dumb, but I do not required N:N relationship for queries so often).

NN2

We can’t see “test” entity

Well, in fact, the solution was pretty simple, even if this is not mentioned anywhere: You have to keep the left hand menu of the relationship displayed to be able to use it in advanced find.

NN3 NN4

“Nom au pluriel” means “Plural name”, and we can now see “test” entity

Tuesday, October 26, 2010

CRM 4.0: Overriding lookup onclick

For one of my customer, I faced a difficulty. I wanted to override the lookup onclick event to provide my own lookup selection that uses a treeview (see below picture) which is much mor euser friendly when we talk about self related entities.

Lookup1

Lookup2

The problem : the behavior of the lookup is controled by a .htc file. It is a bad idea to change this kind of file (unsupported) and you can’t just remove the link to this file in the css class because you will loose all behaviors, not just onclick one.

The only way I found was to create a new lookup image with its own behavior, hide the original one, and add the new image next to the original one. All this using javascript. It is also unsupported but you are sure that your javascript won’t be override during rollup installation or other kind of CRM updates.

Here is the javascript:

   1: var lookupAttribute = "new_categoryid";
   2:  
   3: crmForm.performNewClick = function ()
   4: {
   5:     // Put here your alternative onclick code
   6: }
   7:  
   8: // Build lookup replacement image
   9: var replacementImage = "<img src='/_imgs/btn_off_lookup.gif'";
  10: replacementImage += "onclick='crmForm.performNewClick();'";
  11: replacementImage += "onmouseover='this.src=\"/_imgs/btn_on_lookup.gif\"'";
  12: replacementImage += "onmouseout='this.src=\"/_imgs/btn_off_lookup.gif\"'/>";
  13:  
  14: // Hide original lookup image
  15: window.document.getElementById(lookupAttribute).style.display= 'none';
  16:  
  17: // Add the replacement image on the lookup cell
  18: var lookupCell = window.document.getElementById(lookupAttribute).parentElement;
  19: lookupCellContent.innerHTML = lookupCellContent.innerHTML  + replacementImage;

Edit: the previous code seems to fail with a Javaµcript error. You can use the code below instead:

  1: // Entity to search
  2: var entityToSearch = "new_parameter";
  3: // Lookup attribute on form 
  4: var formLookupAttributeToFill = "new_parametreid";
  5: 
  6: document.CustomLookup = function ()
  7: {
  8: 	// Paste here your alternative onclick code	
  9: 
 10: 	crmForm.all[formLookupAttributeToFill].FireOnChange();
 11: }
 12: 
 13: crmForm.all[formLookupAttributeToFill].onclick = document.CustomLookup;

Wednesday, September 22, 2010

20.000 visits!

Hi all,

Just a big thank you to be so many to visit my blog!

You were a little more that 20.000 in a little less that 2 years…

I hope I will be able to make still more people visiting this blog, even if I don’t have lot of time these days to write here.

See you on this blog, Dynamics CRM forums or anywhere else !

Tool Update : ISV Config Manager

Just a small update regarding the attribute AvailableOffline that used incorrect value and makes the forms crash.

The tool has been updated and can be downloaded in the same place as before.

Tuesday, August 3, 2010

Tool update: Form Javascript Manager

Today, a small update on this tool. Scott Sewell told me that some characters were not escaped correctly when exporting scripts from the CRM server.

It is true but as you might know I’m French so I work mainly with French environments and this problem was not showing on French CRM servers…

Anyway, the bug is corrected and you can download the latest version, as usual, on the right pane of this blog.

Wednesday, July 28, 2010

Survey Result: Which one of my tools do you use the more?

Here is the result of the survey:

Surevy

I’m not so surprised by the result… The top 3 represents the tool that help me the most during my customizations.

Tool update: View Layout Replicator

Here is an update again… Well, that should be the last one as the tool should manage every aspect of a view layout from now.

So, the problem was the following: When views were replicated, some attributes that are not used in the layout were remaining in the fetchXml part of the view (the part that defines which records will be displayed).

This avoids to delete these attributes from the entity as they were still used in a published view, even if you were not able to remove this reference (Unless you export the customization, remove the attribute from the fetchXml and import back the updated customization).

This new version takes care of the layoutXml (which columns are displayed) AND the fetchXml (which attributes are retrieved under which conditions).

I hope nobody was affected by this problem.

As usual, you can download the latest version on the right pane of this blog.

New tool : Home page updater

This tool is a pretty small one and was created as I was looking how it was possible to bulk update user options.

So, the tool just allows you to select users and define which pane and tab will be used as the user home page.

HomePageUpdater

Download:

Tuesday, July 13, 2010

Tool update: View Layout Replicator

Hi all,

After a week of holidays in a charming French island in the Atlantic ocean, I’m back with full battery!

Just before my holidays, I updated the view layout replicator since I encountered some difficulties replicating views with related entity attributes. In fact, the tool wasn’t able to manage these attributes correctly.

So here is the update:

  • You can now replicate views with related entity attributes
  • For associated view (that doesn’t support these related entity attributes) that is chosen as target view, the entity related attributes are not replicated and a message warns you about this particular treatment. In previous version, the view was not replicated at all.

As usual, you can download the latest version on the right panel of this blog.

Thursday, July 1, 2010

MVP award nomination

Today I am proud to announce that I have been nominated for the MVP program.
So thank you to everyone that made this possible: I refer particularly to Andrew Zimmer and Philip B. from Microsoft France.
I will do my best to continue to lend my support to the Microsoft Dynamics CRM community, both through this blog on the forums.


Thank you again everyone, you made this possible !


Tuesday, June 29, 2010

Update: View Layout Replicator

Hi all,

So long since the last post…

I just posted an update on the tool with two changes:

  • The tool now displays the Xml layout of selected views
  • The tool now propagates only the cell Xml nodes from the source view to the target view instead of the whole layoutxml property. That should avoid incompatibilities between different view types (especially the associated view).

As usual, use links on the right side or go to http://mscrmtools.wordpress.com

Tuesday, May 11, 2010

Update: Isv Configuration Manager

Hi,

Today, one bug fix and one enhancement for this tool

1) A guy named Christoph has informed me that the attributes ValidForCreate and ValidForUpdate (in Button and MenuItem) are not set to “0” when you don’t action them. It is now corrected.

2) For the enhancement, it is just about Javascript boxes. I had to put heavy Javascript recently in buttons and menu items and I found that too boring not being able to select all existing script and delete it or even edit it in a wider window.

So, I have added two buttons near Javascript textboxes:

  • One for clearing the textbox content
  • One to open a sizable edit dialog window

The two new buttonsJavaScriptControl The edit dialog window
EditJavaScriptForm

As usual, use the download link to get the latest version

Friday, May 7, 2010

Tool Update: BulkDeleteLauncher

Hi,

So much posts on my blog in these days… :)

Some of you must know that the SDK has been updated with version 4.0.12 (download link).

I am responsible of one of the SDK update, as I opened a case regarding the error occuring when using MONTHLY recurrence :

Recurrence Pattern in Asynchronous Job Execution
Corrected information about job execution frequency. Removed "MONTHLY" interval and added "YEARLY" interval.

If you used my tool, you will have noticed that the MONTHLY recurrency was not working. It was a type mismatch in the SDK that is now corrected.

So the tool was also corrected to remove MONTHLY recurrency and add YEARLY recurrency.

Use the usual link to download the last version.

Survey result: What do you think about the tools from this blog

Hi,

Here is the result of the survey : "What do you think about the tools from this blog"



I even sleep with them
  7 (19%)
Very useful
  23 (63%)
Sometimes useful
  4 (11%)
I tried but don't like them
  1 (2%)
Never heard about them
  1 (2%)



I can just say that my work doesn't seem useless, which makes me happy!



A new survey is now available for two months: Which one of my tool do you use the more?

Thursday, May 6, 2010

Update: Form Javascript Manager

Hi all,
It is a long time since I have posted some news on my blog… Well, I have lot of work and have to deal with many CRM projects. Not easy everyday :)
Today, it is not really a tool update, almost a new tool. If you download the latest version of the FormJavascriptManager, you will find a second tool: FormJavascriptManagerCommand.
It is a command line utility that will allow you to automate export and import of your form scripts. Thanks to Bianca for the idea after a presentation of TFS2010 and CRM project automation.
Here are some instructions:
FormJavascriptManager.exe /c <connectionName> /f <folderPath> [/i|/e] [optionalParameters]
Mandatory Parameters:
/c <connectionName> : Name of the connection to use in mscrmtools.config file
/f <folderPath> : Folder where to read and write scripts
/e <entitiesList> : Export the scripts of specified entities in <entitiesList> (with format entity1;entity2;entity3)
OR
/i : Import the scripts located in the specified folder
Optional Parameters:
/p : Publish the customizations (Must be used with /i parameter)
/pwd <password> : Password when using custom or IFD authentication
/l <logFilePath> : Path for the log file
Examples
FormJavascriptManager.exe /c AnIfdConnection /pwd MyPassword /e account;contact;lead /f d:\exportFolder /l d:\logFolder\log.txt
FormJavascriptManager.exe /c OnPremiseConnection /i /p /f d:\importFolder /l d:\logFolder\log.txt

Monday, April 12, 2010

Error message after having raised the length of an address field

Pointless error message:

GenericErrorMessageThis message can occur, when you save the form, if you raised the length of address fields in account, contact or lead entity.

The cause is simple: Even if you can add as many characters in these fields as you specify in the customization, the value is also duplicated in the customeraddress entity. If you forgot to customize also that entity, you will get the above error message.

Solution? Just customize the customeraddress entity like the account, contact or lead entity.

Sunday, April 11, 2010

Updating custom entities icons

For all our projects, we are always customizing Microsoft Dynamics CRM 4.0. To achieve that, we create many custom entities and one of the worst aspect of that heavy customization is to have a lot of custom entities with the same icon. So, it is difficult to identify them just with their icon (like the screenshot below).CustomEntitiesStdIn order to customize further the application, it is a good thing to add different icon to each custom entity.

The standard approach

This approach consists of using the standard feature of Microsoft Dynamics CRM 4.0 to update custom entites icons. In the customization view, just click on the menu “More actions” and click on “Update icons…”.

UpdateIcones 
You then need to provide a file for each required icons:

  • icon in web application (16x16 / gif / less that 10kb)
  • Shortcut icon in Outlook (32x32 / ico / less than 10kb)
  • Icon in entity form (66x48 / gif / less than 10kb)

UpdateIcones2

As you can see, it has a lot of restriction and you need to create your own ico file, which is not always an easy thing. And let’s be realistic, everybody is not an artist and can create icons…

The best approach 

The best approach, from my point of view, of course…

… is to use the Demonstration Tools provided by Microsoft (download here). This tool as many features but one of the best is “Icon Maker” feature.

DTIconMaker

  • The “Icon Maker” allows you to select a file for each of the three required icons or a file for the three of them.
  • It helps you to create the Entity Form icon with a background (which is the hardest icon to produce by your own).
  • You can use BMP, PNG and JPG image format, not only GIF

DTIconMaker2 Just select your image(s), adapt the Entity Form icon, and click on “Publish to CRM” button to select the entity to update.

DTPublish

If the icons are not beautiful enough for you, you can also save the three resulting icons to update them using your favorite drawning software.

DTSavedIcons

The final result:

CustomEntities2

Some resources

Free icons:

http://www.famfamfam.com/

http://www.freeiconsweb.com/

http://www.iconfinder.com/free_icons

http://www.iconspedia.com/

Other icons:

www.iconexperience.com

http://www.777icons.com

http://www.iconarchive.com/

Friday, April 9, 2010

Management Pack for SCOM 2007

Since MOM Management Pack, there wasn't anything regarding the latest version of the operating management for Dynamics CRM 4.0.

It is out now!

See the post on the CRM team blog

Wednesday, March 31, 2010

MSCRMTools repository

Hi,

I created a dedicated site for my tools. This site is quite basic but provide links to download the tools and a small tutorial for each one of them.

I thought it is a better way to distribute the tools to my (or your) customers, partners and colleagues since it avoid to go through the blog (even if the tools are quite easily accessible).

The link: http://mscrmtools.wordpress.com

I hope you will like it...

Saturday, March 27, 2010

Empty AsyncOperationBase table when it is too big

With one of my client, I came across a particularly disturbing issue. The symptoms were:
  • 2 minutes to delete a single record  
  • Timeout on restarting the Microsoft CRM asynchronous processing service  
  • Unable to display a view on workflows or system tasks.  
  • Incredibly long time wait for any SQL statement on AsyncOperationBase table

Passing a script on the organization database to identify the sizes of tables, I realized that two tables seem particularly large: 

  • AsyncOperationBase (800 000 lines)
  • DuplicateRecordBase (15 000 000 lines)

The total size of the database was 12GB.

 
After passing through the Microsoft support for a procedure to purge these tables, the answer was procedures that would require whole days of SQL processing, which was clearly not an option for a production server.

 
In agreement with my client, we decided to delete and recreate these tables instead of trying to empty them.

 
WARNING! The following procedure is of course unsupported and provided as is without any warranty.

 
It has the following constraints:

  • No job systems, workflow and detection of duplicates job will be retained.

  • All running workflows will also be deleted
!!! THEREFORE PLEASE START BY PERFORMING A BACKUP OF YOUR ORGANIZATION DATABASE !!!

 
The table that we want to delete the table is AsyncOperationBase. First thing to do, identify all the dependencies for that table. To do this, start deleing the table. The following screen appears:  

 

 
IDENTIFYING THE DEPENDENCY OF THE TABLE ASYNCOPERATIONBASE
Click the dependencies in the bottom right. Here is the list of dependent components:  

 

 
Before deleting the table AsyncOperationBase, so we'll have to delete all dependent items.

 
SCRIPT GENERATION TO RECREATE DEPENDANT ELEMENTS
Before that, he'll have to create the SQL scripts that will allow us to recreate the elements that will be deleted.
Right click on the database of the CRM organization, Tasks, Generate Scripts.

 

 
In the options for generating scripts, make sure you turn on all options for tables and views as to the screenshot below.

 

 
Then select the items that will recreate. We need tables, views and user defined functions.

 

 
Follow the wizard to generate scripts for the complete script to recreate the elements that we remove. When selecting items, you have therefore chosen only those items that were listed in the dependencies of AsyncOperationBase table.

 
DELETION OF DEPENDENT ELEMENTS
You can now delete items that were listed in the dependencies table AsyncOperationBase. Delete the elements with no dependencies first to go back to the table AsyncOperationBase.

 
RECREATE DELETED ELEMENTS
Once all the deleted items, use the script generated previously to recreate the elements that have been deleted.

 
CONCLUSION
Normally, you should have a "brand new CRM" (at least for system tasks, workflow logs, bulk deletion jobs, etc..).

 
For information after this procedure:  

  • The size of the database is 2GB
  • The asynchronous processing service restarts in no time
  • Record deletion is very fast 
  • Fast display of system tasks, workflow logs, etc.

After two days of intensive use of the CRM application in terms of workflow, bulk deletion, data import, there is no problem found.

 
Some tips to avoid swell these tables:  

  • Planning tasks to delete bulk to clean the table of system tasks regularly.
  • Disable the detection rules that are duplicates or not involving fields ever used. By default, if you create many prospect without email address, default duplicate detection rule applies and therefore generates many rows in the table DuplicationRecordBase.  

Wednesday, March 24, 2010

Tools update: Improving the speed and lightness

Hi,

I just updated three of my tools to make them faster and lighter:
  • BulkDeleteLauncher
  • ViewLayoutReplicator
  • SearchablePropertyAttributeUpdater
To do that, I just cleaned the content of the web reference to keep only classes used by the tools.

The average weight of the tools was 1,2MB. It is now 350KB
Also, the first call to the crm web service is faster as there is so much less data to load

Monday, March 22, 2010

How to create a relative URL in site map to static content under the ISV folder in CRM 4

Very interesting post about the sitemap and ISV folder on the EMEA support blog:
How to create a relative URL in site map to static content under the ISV folder in CRM 4

Remove unwanted activities from web interface

Hi,

I love the CRM forums because lot of people are asking very interesting question...

The last I liked was: how to remove some activities when I click on "New" button in the activities grid or when I click to the top menu "New activity".
Indeed, if you don't want to use the campaign response activity, or any other of them, you can't hide them in a native and supported way.

So, I give you some hints to hide these activities.

Please be aware that these methods are unsupported! Make a backup of each mentionned file before follwoing this procedure.

Removing an activity in the "New" activity dialog in activities grid
To remove the activity you want, open the file \Activities\dlg_create.aspx.

Search for the block in blue in the screenshot below. You can comment or delete the lines that correspond to the activities you need to hide. Then save the file.


Removing an activity from the "New activity" top menu
For this one, open the file \_root\bar_top.aspx.

Search for the function "CheckAddin()". This method is called during page loading. Add the line (see screenshot below) corresponding to the activity you need to hide.

The all list of activities id is:
  • btn_new_task
  • btn_new_fax
  • btn_new_phonecall
  • btn_new_email
  • btn_new_letter
  • btn_new_appointment
  • btn_new_serviceappointment
  • btn_new_campaignresponse
The result, if I hide the camaping response activity is below:

Saturday, March 20, 2010

New tool: AssemblyRecovery

Hi,

Someone, on Microsoft CRM forums, asked how he would be able to compare plugins or workflow activities between two environments...
The obvious answer was to use Reflector to analyze the content of these assemblies.

What? You don't have the assemblies? You are not sure which version of the assembly is stored in CRM database?

No problem! Just use this new tool that allows you to display the list of custom assemblies and recover them on your disk.



As usual, the tool can be downloaded with the following link:

Tuesday, March 16, 2010

CrmDiagTool: Download location changed

Hi,

As Benjamin Lecoq is leaving Microsoft, the CrmDiagTool could have been orphaned...

But no! The EMEA support team is the new hoster for this MUST HAVE tool. You can find the tool here: EMEA Support team

David Berry JavaScript Grid Editor

David Berry developed an awesome javascript to allow the grids to be editable...

See his blog: http://crmentropy.blogspot.com/p/javascript-grid-editor.html

Thursday, March 11, 2010

Tool Update: Form Javascript Manager

Hi,


Thanks to Andrew Zimmer, a bug has been corrected in the tool.


This bug made the tool decoding the HTML characters that were encoded when exporting the customizations. So when you were importing them back, the HTML characters were no more encoded...


You can download this latest version from the usual location (right pane of the blog) 

Tuesday, March 9, 2010

Survey available

Hi,

Just to inform you that I put a survey on the top right part of this blog...

Thank you for your participation!

Update: Access Checker

Thanks to Andrew request (see previous post comments), I uploaded a new version of the tool.

New features:
  • Tooltip on each privilege to see the privilege ID
  • A "name" resolution is made against the object ID specified (I use the primary attribute of the entity)

I will focus next on the peformance of the tool (I need to do some clean up on the CrmService reference to speed the tool)...

Enjoy

Friday, March 5, 2010

New tool: Access Checker

Hello everyone,

It's been a while that I'm back but I have a lot of work and so little time for this blog.

However, things promise is a promise, here is a small tool that could make your life easier.

Have you ever encountered this error message:

SecLib::AccessCheckEx failed. Returned hr = -2147187962, ObjectID: 1ef9f412-6601-dd11-8655-0019b9dfe618, OwningUser: 98bbc999-96a2-de11-aeaf-0019b9dfe227 and CallingUser: 037c1c90-96a2-de11-aeaf-0019b9dfe227

You do not really know what object and what user it is and especially what rights might fail him. With this tool, you can put all these IDs and know what are the privileges of the user regarding this record.

With this tool, you can:

  • Indicate which entity you want to inspect
  • Enter the identifier of the object in question
  • Searching for a user with its name or its unique identifier
Click the “Retrieve rights” button and the program will tell you what rights the user with respect to the record.



As usual, if you need improvment or detect a bug, do not hesitate to contact me

The tool can be downloaded just below (and in the archive with all tools)

Thursday, January 7, 2010

I'll be back in a month

Hi,

I am leaving for my honeymoon tomorrow. So there won't be any post for a month...

I won't be thinking of you! Except if you live in New Zealand, where I go... :)

Have a nice January month!

PS: A new tool will be available when I come back