Wednesday, April 1, 2009

Error While Viewing Saved View (Reports)

Recently I had this strange issue when I create a View to contain all my custom Reports (SSRS) to Reports Entity and Dynamics CRM Errors Out when I select theView (from MyReports section).

Problem Creation:
1. Settings -> Customize -> Reports
2. Views-> New View -> Add Filter (to select custom reports).
3. Save and Publish.
4. WorkPlace -> MyReports
5. Select View (created from 2) - this should error out.

Resolution:
1. Add Report Type to the Columns of the View.

FetchXML

During Custom Development in Dynamics CRM 4.0, we could interact with CRM Entities in two ways.

Method 1 (QueryExpression, QueryByAttribute)
Method 2 FetchXML

Method 1 is simple to use as We get Intellisense support in Visual Studio IDE (using CRMSdk) but one of the major limitation is the resultset is limited to only one Entity. So if you want resultset combining attributes of two entities, we cannot do that.

FetchXML comes to the rescue for the later part when the query becomes complex. Lot many times building FetchXML by hand is prone to errors, so if there any utility which can build fetchxml would be awesome and make the development effort more quicker.

I use the FetchXML Builder Utility from James Downey.. so If anybody need info about this.. you can get from here..

http://jamesdowney.net/blog/post/CRM-40-Version-of-FetchXML-Builder-Released-(Finally).aspx

Dynamics CRM 4.0 - Removing 'Add Existing' Label

When we add the Associated Entities of a custom entities in an IFRAME in a grid, the grid shows the Labels "Add Existing XXXX to this Record". Here is a nice article to hide the same.. according to this blog, Microsoft said that they are going to make that label as optional in next release... but until then.. follow the steps in this blog.

http://blog.davehawes.com/post/2008/04/23/MSCRM-4-Remove-Add-Existing-xxxxx-button.aspx

Dynamics CRM 4.0 OnLine and OffLine PlugIns

The plugin Code executes twice, if it is enabled to work for Off-line. the following article from msdn shows the steps which we have to include while we code for offline-online execution of plugins

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

CRM Book Shelf

This link from msdn.. lists all the good books that are available for Dynamics CRM 4.0.
It also lists out Intended Audience, which really narrows down the selections (depending on what we are looking for)...

http://blogs.msdn.com/crm/archive/2008/12/22/microsoft-dynamics-crm-4-0-bookshelf.aspx

CRM LookUp To Show Related Entities

Most of the times, we require the LookUps to show filtered Records to show narrow dataset which are relavant.

This Link from Jim Wangs Blog shows exactly all the steps to follow... really helped me.

http://jianwang.blogspot.com/2008/05/mysterious-crm-lookup-ii.html

MultiSelect(PickList) For Dynamics CRM 4.0

This is quite useful.

MultiSelect PickList for Dynamics CRM 4.0

http://mscrm4ever.blogspot.com/2008/12/crm-40-supported-multi-select-picklist.html

Cloning Entity in Dynamics CRM 4.0

We had a request for Cloning an Entity in Dynamics CRM.
For acheiving this functionality, I have followed the following steps.
  1. Added a field called "createdAsCopy" which is a bit field
  2. Added a field called "referrerEntityID" which holds the EntityID which is to be cloned.
  3. Created a manually run WorkFlow called Copy Entity which copies all attributes to the new entity and flags the attribute "createdAsCopy" as "Yes" and fills "referrerEntityID" with EntityID of Entity which is to be Cloned
  4. If there is any plugin-code (post-Create) should read the createdAsCopy and do the necessary creation of related entities.
Here is one link I got from Internet (regarding Cloning Entity) with an alternative approach.

http://mscrm4ever.blogspot.com/2008/06/cloning-entity-using-javascript.html

Dynamics CRM Installation and 404 Error From PlugIn

This is my first CRM Project going for Production. We had everything working fine with our development server which was a On-Premise Installation. While our Installation On Production was giving a 404 Error while Executing code from Plugin.

In Production enviroment the host name was different from the machine name, so the webservice (crmService.Execute) was giving an 404 Error.

I added the bindings to 127.0.0.1 for CRM WebSite for localhost, that fixed my problem based on this tip from Bill Owens Blog.

http://billoncrmtech.blogspot.com/2008/07/plug-ins-error-out-when-crm-is-not-on.html

Filtering Views in CRM 4.0 Using Plug-In

In our Project, We have around 10 reports. Since We are not using any of CRM Reports, and doesnt want to mess around the CRM Installation anyway, I have searched around the web of whether I could hide the CRM Reports from the Users so that they will see only relevant reports.


I have found this nice little tip from Bill Owens Blog of how to hide the Views, which I customized so that users can only see the relevant reports when they click "MyReports" from the workPlace. For this I created a View for the reports that includes the required reports and hide all other Views, when the user requests to see the Reports.

http://billoncrmtech.blogspot.com/2008/05/hiding-views-in-crm-40-using-plug-in.html

Advanced Find View in IFrame

I have been working for the past 2 months with Dynamics CRM 4.0. It has been very good seeing what we can accomplish with very little code. I had a requirement of showing entities with related attributes in another entities in a grid. I have searched around and found this one meeting with my requirements. Hope this helps, if some one needs it.

http://social.microsoft.com/forums/en-US/crm/thread/fc98391d-d8d5-4e2b-a595-1d525d475c84/