Tuesday, August 25, 2009

Changing Ownership of Accounts changes ownership of others too

When we reassign a CRM Record then by default, Dynamics CRM reassigns all child records too. This behavior has consequences you might not want, such as reassigning paid invoices and other closed transaction records too, or think about a scene where two different sales reps are working on two different opportunities, associated with the same account then if the ownership of account changes the CRM reassigns the ownership of these two Opportunities too to the new owner, not only that the reassignment is done irrespective of the status of the related child record. i.e even the closed sales too goes in account of the new owner.

In short Selecting a different value for the “Owner” field (reassigning of the record) would reassign the account to the newly selected CRM user. Along with a lot of other records, which is the potential problem when historical sales reports are needed.

for quite some time i was thinking about the issue and the possible solution. Today I got a surprise visitor in my outlook (the RSS feed from dynamicscrmtrickbag). much to my surprise Richard Knudson explained the same issue and the solution in his blog.

The solution was quite simple :

Have a look at all of the 1:N relationships the Account entity has with other
Dynamics CRM entities , change the Type of Behavior of the required relationship
from default “Parental” relationship to “Configurable Cascading” and change the
assignment behaviour by changing the "Assign" value to the desired behaviour
(Cascade Active or Cascade None or Cascade User-Owned).

I would recommand the reading of full article here.

Great piece of artwork Richard. Cheers.

Wednesday, July 22, 2009

How to Troubleshoot the Outlook CRM Client

Hello all,

The Outlook Client for CRM is one of the most intriguing features in the Microsoft Dynamics CRM 4.0. Rather than having users ‘go somewhere else’ to use CRM, the Outlook CRM client provides in integration to Outlook — allowing end users easy access to CRM from where they do most of their day to day work.

Due to the sheer number of components the Outlook CRM client leverages, troubleshooting problems related to it could best be described as an adventure.

A great article is posted at the CRM Team Blog recently about how to troubleshoot and isolate common Outlook CRM Client issues. this could be of great help for those experiencing issues. Don’t forget to run that Diagnostic Tool first.

go through it here :

http://blogs.msdn.com/crm/archive/2009/05/29/troubleshooting-the-microsoft-dynamics-crm-client-for-outlook.aspx

Tuesday, July 21, 2009

Cannot Delete/Publish changes in a Custom/System Entity

Hi all,

for quite some time I was struggling with this issue :

Neither we were able to publish changes to a custom entity nor the system allowing us to delete it. while doing so we get the general popup error from that says "An error has occured." We were able to publish updates to all other entities. Also we could add or delete other custom entities.

Another thing that Custom entities have their own custom icons when you click on them and go into the Form or looking at an attribute. For these entities, there's just a red X. I didn't delete any files but still no icons were displayed while other custom entities that work display the icons just fine.


after enabling the trace we found this in trace log :

[NullReferenceException: Object reference not set to an instance of an object.] at Microsoft.Crm.ObjectModel.OrganizationUIService.LabelLoaderAllLanguages.LoadMetadataLabel(Int32 entityType, String attributeName, ExecutionContext context) at Microsoft.Crm.ObjectModel.OrganizationUIService.LabelLoader.LoadCellLabel(Guid cellObjectId, String cellObjectColumnName, Int32 objectType, String attributeName, ExecutionContext context) at Microsoft.Crm.ObjectModel.OrganizationUIService.InsertFormLabels(IBusinessEntity entity, ILabelLoader labelLoader, ExecutionContext context) at Microsoft.Crm.ObjectModel.OrganizationUIService.RetrieveMultipleWithAllLanguages(EntityExpression entityExpression, ExecutionContext context) at Microsoft.Crm.Metadata.OrganizationUIHelper.RetrieveInProductionHelper(Int32 objectTypeCode, ExecutionContext context) at Microsoft.Crm.Tools.ImportExportPublish.FormXmlHandler.ExportItem(XmlDocument importDocument) at Microsoft.Crm.Tools.ImportExportPublish.ExportHandler.Export(XmlDocument XDoc) at Microsoft.Crm.Tools.ImportExportPublish.ExportHandler.Export(XmlDocument XDoc) at Microsoft.Crm.Tools.ImportExportPublish.RootExportHandler.RunExport(String[] ExportEntities, String[] ExportRoles, String[] ExportWorkflows, ExportMask Mask) at Microsoft.Crm.Tools.ImportExportPublish.ExportXml.RunExport(String xmlArgs, XmlDocument& ExportDoc) at Microsoft.Crm.WebServices.ExportXmlService.ExportCompressed(String entities, String embeddedFileName, ExecutionContext context) [TargetInvocationException: Exception has been thrown by the target of an invocation.] at Microsoft.Crm.Application.Utility.Util.RaiseXMLError(Exception exception) at Microsoft.Crm.Dialogs.ExportCustomizationsPage.ConfigureForm() at Microsoft.Crm.Application.Controls.AppUIPage.OnPreRender(EventArgs e) at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) [HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown.] at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) at System.Web.UI.Page.ProcessRequest(HttpContext context) at ASP.cot_puritech__grid_cmds_dlg_exportcustomizations_aspx.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

After a long search i zeroed in to these posts:

http://social.microsoft.com/Forums/en-US/crm/thread/f6de6b65-29e7-4238-a042-c808ee65c026

and
http://social.microsoft.com/Forums/en-US/crmdevelopment/thread/da7aaa95-aa1b-42b7-a56e-f895354e99e8


In the first post the solution provided by André M Mestre
"This is normally caused by a missing attribute or a missing label:
[NullReferenceException: Object reference not set to an instance of an object.] at Microsoft.Crm.ObjectModel.OrganizationUIService.LabelLoaderAllLanguages.LoadMetadataLabel

So to solve this you need to go directly to your database and check in the XML of the forms and views and the XML of the entity and then find out if all the attributes that you can see in there are still viewable in the CRM UI. If not you should correct the XML and then update the database.
The XML for the Form is in the OrganizationUIBase table and you can also check the XML for the views in the UserQueryBase and in the SavedQueryBase.

This is unsupported by Microsoft but is the only solution I know for this kind of issues.
Also please note that correcting the XML might be tricky sometimes."


with the help of the above mentioned solution I checked the Form XML in OrganizationUIBase table and figured out that there was an atribute in the Form XML that was actually deleted from the entity and after that i exported the entity from our staging server to the production server. I still dont know why the entity attribute was there in the form? and if the attribute was there in the form then why the system allowed me to delete the attribute ?

but anyways after recreating the attribute in the entity everything started working properly. it now allows me to publish the changes and even deleting the entity.

hope this will help someone else too.

Monday, June 15, 2009

Create Custom Workflow Activities for Microsoft Dynamics CRM 4.0

Sometimes there are situations when we need to add our own custom logic in workflow. The answer to it is custom workflow activity in Microsoft Dynamics CRM 4.0.

keeping that in mind I have decided to write a post for the same, but as usual before writing any new post I searched for the same on some of my favourite blogs and then I found a great article on the same on stunnware.

A must read post for all newbies. You can find it here.

happy coding :-)

Thursday, June 11, 2009

Invalid Argument error when importing customization

If you export an entity before it has been published, you will get an 'Invalid Argument' error when importing the entity if it has any relationships.

The reason for this is that the relationship attribute will have no display name, which results in the error. The simplest solution would be to go back to the original deployment, publish the entity, then export again. But, if that's not an option, you can fix the problem within the exported xml as follows:

The invalid relationship xml will look like the following:





The problem is that the displaynames element is blank. This can be changed to something like the following





The languagecode attribute will need to be set to the correct value for your deployment. Many other elements will have this value set in the customizations.xml file

Wednesday, June 10, 2009

"Not have enough privilege to complete Create operation for an Sdk entity" exception while registering a CRM 4.0 plug-in

when you try to deploy new plug-in assembly into CRM 4.0 and instead of successfully deploying you get the strange looking Soap Exception "Not have enough privilege to complete Create operation for an Sdk entity".

Unhandled Exception: System.Web.Services.Protocols.SoapException: Server was unable to process request.
Detail:




0x80040256
Not have enough privilege to complete Create operation for an Sdk entity.
Platform




It looked pretty strange because your user might be having System Administrator role and in CRM it might be having all the rights.

Note: The Active Directory account used to deploy and register new assembly into CRM 4.0 database has to be added into Deployment Administrators group in CRM Deployment Manager.

Here are the steps to accomplish this:

1. Open CRM 4.0 Deployment Manager Console (Start -> All Programs -> Microsoft Dynamics CRM -> Deployment Manager).

2. Go to “Deployment Administrators” node and choose “New Deployment Administrator…” option.

3. Insert appropriate user and confirm selection by clicking “OK” button.

After completing this step, your users will be able to register and deploy the assembly successfully. So, remember about this when you try to deploy plug-ins with user that you added to CRM.
Happy Coding :-)

wish to change the code after plugin is deployed ?

After registering your plugin if you wish to change the code, you might get a build error when building the solution again in Visual Studio:
something like :
Unable to copy file "obj\debug\MyPlugin.dll" to "..\..\..\..\Program Files\Microsoft Dynamics CRM Server\Server\bin\assembly\MyPlugin.dll". the process can not access the file "..\..\..\..\Program Files\Microsoft Dynamics CRM Server\Server\bin\assembly\MyPlugin.dll". because it is being used by another process.
This occurs because Microsoft CRM has a lock on the DLL. In order to release the lock, you have to restart the service that has it locked.

For synchronous plug-ins, the CRM Application Pool within IIS can be recycled, or you can run IISReset.

For asynchronous plug-ins and custom workflow assemblies, you have to restart the Microsoft CRM Asynchronous Processing Service in the Services Control panel Applet.

To recycle the CRM Application Pool from the command line: Click Start, Run, type “cscript c:\windows\system32\iisapp.vbs /a CRMAppPool /r” and press enter.

To restart the Microsoft CRM Asynchronous Processing Service from the command line: Click Start, Run, type “net stop mscrmasyncservice” and press enter. Click start, Run, type “net start mscrmasyncservice” and press enter.

Thursday, May 28, 2009

Share Records programmatically

Few days back our client placed a new requirement that he needs the newly created lead needs to to be shared by all the team mates of the businessunit, and that needs to be done automatically. I thought a workflow on lead creation will do the job. But when I sit on the system and to my surprise found that there is no option in the workflow manager for the same. I started scratching my head and at last decided to write a plugin for the same. Now instead of writing everything from scratch I asked the same to my good old friend (GOOGLE) :-) and i was really surprised to get this post by David Fronk of Dynamic Methods Inc. He explained everything in such detail that ...... it starts looking like a kid's play.

With all credit to his great job the excerpts of the post is :

Most implementations just open things up at the business unit level, or even the global level (depending on the size of the company) and don't even worry about sharing. However, there are times when certain information can be sensitive and necessary to restrict access to. Typically these things can be activities, opportunities, cases, services billed, hours worked, etc.


For instance, suppose sales reps aren't allowed to see support cases but are allowed to see the accounts that they manage. Any good account manager would want to know what support issues their account has been having before engaging on a new business proposal, so obviously the sales rep should get to see the cases related to the account.


All that is required is a couple of plugins at two main points and upon creation of a case and reassignment of an account. Whenever a case is created, get the account manager of the account on the case and share the case with that user. If the account gets reassigned, remove the share from the old account manager and add rights to the new account manager. Now with simple logic you can make data more accessible to those who should see the data without them having to do anything more than their regular job.


One side note, be aware that the more items there are under a parent record the longer the reassignments of records will take. For instance, if I reassign an account with 50 cases that's going to take a lot longer to complete the reassignment than it would if there were 5 cases, or even none. Just keep that in mind as you develop your sharing solution.


Pretty simple, and the SDK has some great examples on how to do this. Look up "AccessRights Enumeration", "GrantAccess Message", and "RevokeAccess Message" in the SDK and you should have everything you need.


Here's a quick example on how to share and give all rights to a user:





SecurityPrincipal principal = new
SecurityPrincipal();
principal.Type = SecurityPrincipalType.User;
principal.PrincipalId = new
Guid("7B222F98-F48A-4AED-9D09-77A19CB6EE82");
PrincipalAccess access = new
PrincipalAccess();
access.Principal = principal;
access.AccessMask = AccessRights.ReadAccess;

TargetOwnedDynamic target = new
TargetOwnedDynamic();
target.EntityId = new
Guid("6A92D3AE-A9C9-4E44-9FA6-F3D5643753C1");
target.EntityName = "incident";

GrantAccessRequest readGrant = new
GrantAccessRequest();
readGrant.PrincipalAccess = access;
readGrant.Target = target;
GrantAccessResponse readGranted = (GrantAccessResponse)crmService.Execute(readGrant);

access.AccessMask = AccessRights.WriteAccess;
readGrant.PrincipalAccess = access;
GrantAccessResponse writeGranted = (GrantAccessResponse)crmService.Execute(readGrant);

access.AccessMask = AccessRights.AppendAccess;
readGrant.PrincipalAccess = access;
GrantAccessResponse appendGranted = (GrantAccessResponse)crmService.Execute(readGrant);

access.AccessMask = AccessRights.AppendToAccess;
readGrant.PrincipalAccess = access;
GrantAccessResponse appendToGranted = (GrantAccessResponse)crmService.Execute(readGrant);

access.AccessMask = AccessRights.AssignAccess;
readGrant.PrincipalAccess = access;
GrantAccessResponse assignGranted = (GrantAccessResponse)crmService.Execute(readGrant);

access.AccessMask = AccessRights.DeleteAccess;
readGrant.PrincipalAccess = access;
GrantAccessResponse deleteGranted = (GrantAccessResponse)crmService.Execute(readGrant);



And here is an example on how to revoke access:





SecurityPrincipal principal = new
SecurityPrincipal();
principal.Type = SecurityPrincipalType.User;
principal.PrincipalId = new
Guid("7B222F98-F48A-4AED-9D09-77A19CB6EE82");
PrincipalAccess access = new
PrincipalAccess();
access.Principal = principal;
access.AccessMask = AccessRights.ReadAccess;

TargetOwnedDynamic target = new
TargetOwnedDynamic();
target.EntityId = new
Guid("6A92D3AE-A9C9-4E44-9FA6-F3D5643753C1");
target.EntityName = "incident";
GrantAccessRequest readGrant = new
GrantAccessRequest();
readGrant.PrincipalAccess = access;
readGrant.Target = target;
GrantAccessResponse readGranted = (GrantAccessResponse)crmService.Execute(readGrant);

Override the tool tip of the field in Dynamics CRM

there are times when you want to give your users more information into what they should enter into a field.

As widely accepted the tooltips are the most commonly used and convenient way to achieve the same.

In Dynamics CRM you could use scripts to override the tool tip of the field.

Here's the code script to override the tool tip of the field in dynamics CRM:





var oPopup = window.createPopup();
var oPopupBody = oPopup.document.body;
oPopupBody.style.fontFamily = 'Tahoma';
oPopupBody.style.border = '1px solid black';

function showPopupMessage (Tool_Tip_Text)
{
oPopupBody.innerHTML = "
";
oPopupBody.innerHTML += "
" + Tool_Tip_Text +"
";
var X_Coordinate= -100;
var Y_Coordinate= 20;
var width = 350;
var height = 90;
var documentElement = event.srcElement;
oPopup.show(X_Coordinate, Y_Coordinate, width, height, documentElement);
}

//Be sure to attach your OnMouseOver event with the field's caption

crmForm.all.new_customfield1_c.attachEvent('onmouseover', showPopupMessage ("custom tooltip for new_customfield1 "));
crmForm.all.new_customfield2_c.attachEvent('onmouseover', showPopupMessage ("custom tooltip for new_customfield2 "));
crmForm.all.new_customfield3_c.attachEvent('onmouseover', showPopupMessage ("custom tooltip for new_customfield3 "));


Now you can hover your mouse over the field labels to see your custom tooltip popup

CRM 4 Certification Practice Tests

Hi all,

Richard recently authored practice test questions for the three core CRM 4 certification exams. he is having LOTS of other articles on the exams and how to prepare for them in the certification category. So if you are thinking of clearing the MB 631 , MB 632 or MB 633 you must visit this place.

you can test your knowledge with these practice test here

i have gone through the tests and it is really great. try your knowledge there and best of luck :-)

How to Convert lead to contact, account and/or opportunity programmatically

Sometime we need to convert a lead to a contact, account and/or opportunity programmatically. to achieve this we have to follow the below mentioned process:

it is a two step process. in the first step we need to disable the lead. This can be done by using the SetStateLeadRequest. In the second step we need to use the InitializeFromRequest and InitializeFromResponse classes. It's the InitializeFromRequest class in which we will need to set the EntityMoniker attribute to the lead which you just disabled in the first step. On the same request we'll need to set the target entityname to the name of the entity we wish to convert the lead into (contact, account or opportunity) and then we'll need to set the TargetFieldType. This would most likely be TargetFieldType.All. Now execute that request and here we go .

code example: in this example we will create a function to convert a lead into account programmatically


// <summary>
// Convert Lead To Account
// </summary>
// <param name="service">CrmService</param>
// <param name="leadID">Guid of the Lead that needs to be converted</param>
// <returns>Guid of ctreated account</returns>
public Guid convertLeadToAccount(CrmService service, Guid leadID)
{
//step one : qualify the lead
SetStateLeadRequest qualifier = new SetStateLeadRequest();
qualifier.EntityId = leadID;
qualifier.LeadState = LeadState.Qualified;
qualifier.LeadStatus = -1;
service.Execute(qualifier);
//Note: lead is qualified, but not converted to account yet

InitializeFromRequest req = new InitializeFromRequest();
// this is the very thing that does the job.
req.EntityMoniker = new Moniker();
req.EntityMoniker.Id = leadID;
req.EntityMoniker.Name = "lead";
req.TargetEntityName = EntityName.account.ToString();
req.TargetFieldType = TargetFieldType.All;
InitializeFromResponse rps = (InitializeFromResponse)service.Execute(req);
Guid AccountID = service.Create(rps.Entity);
return AccountID;
}

Monday, May 18, 2009

How to Create a Dynamic IFRAME

Change the Page Displayed in the IFRAME
You may want to change the target of the IFRAME based on considerations such as the data in the form or whether the user is working offline. You can set the target of the IFRAME dynamically.
Note When you change the URL for the IFRAME, parameters are not passed to the new URL automatically. You need to append the querystring parameters to the URL before setting the src property.
Example
The following code example shows you how to set the src for the IFRAME and pass the parameters.


var params = crmForm.all.IFRAME_test.url;
params = params.substr(params.indexOf('?'));
var newTarget = "http://mysite/mypage.aspx";
newTarget = newTarget + params;
crmForm.all.IFRAME_test.src = newTarget ;


Allow Access to Form Data
If you trust the target site of the IFRAME you can disable the security attribute so cross-frame scripting is enabled. This allows the target page to reference or change data in the entity form.


A script in the target of the IFRAME can access objects in the parent. The crmForm cannot be referenced by name because it does not have an ID associated with it, but it is the first form in the forms collection.
For example, to set the value of a variable named AccountName to the name of the Account, use the following code in a page that is the target of an IFRAME in the account form:


var AccountName = parent.document.forms[0].all.name.DataValue;


This value, or any other value in the form, can then be processed by the Web page that is the target of the IFRAME.
The Web page that is the target of the IFRAME can also update the crmForm field values, as shown in the following code example:

parent.document.forms[0].all.name.DataValue = AccountName;


Note : Scripts in Microsoft Dynamics CRM cannot interact with DHTML elements within the IFRAME. This is a security restriction that is set within Internet Explorer for all IFRAME elements.

Reading field values from a lookup

Here is how the value of a lookup field can be retrieved :


crmForm.all.lookupfield.DataValue[0].name
//gives us the name of the lookup field's selected record.

crmForm.all.lookupfield.DataValue[0].id
//gives us the GUID of the lookup field's selected record.

Tuesday, April 14, 2009

Filtering lookup data in CRM 4

Its a common need for most of the customers to have the filtered lookup fields on the form instead of the current general lookup fields.

while i was browsing on some of my favourite blogs i found a brilient post regarding the same.

while the solution is non microsoft supported , it works for me.

Kudos to George Doubinski for this post
Filtering lookup data in CRM 4

Happy Hacking

Tuesday, February 10, 2009

How to call javascript functions from a custom menuitem

In the previous post we learned how to add custom menus. Now sometimes we need to call some custom functions for some information processing. So for that we can write a javascript function and call that javascript function from the MenuItem click.

for example: we added a MenuItem "Custom JavaScript function" at our desired entity location and wish to call our custom function Myfunction on MenuItem click
so we need to modify the ISV.config as mentioned below:


<MenuItem JavaScript="Myfunction()">
<Titles>
<Title LCID="1033" Text="Custom JavaScript function" />
</Titles>
</MenuItem>


Now place your function in the entity onload event and expose the Myfunction function to the page level e.g. this.Myfunction = Myfunction;


function Myfunction()
{
//Place Your logic Here...
}

this.Myfunction = Myfunction;




Now when you click on the MenuItem "Custom JavaScript function" the function Myfunction will be called.

Adding Custom Menu items

MSCRM provides liberty to add your own CustomMenu to cater your customized needs.
for that purpose all you need to do is to edit the ISV.config file located at path /_Resources/.
This is an xml file so we can say what you all need to do is to customize this xml to suit your needs and you are done.

To add a custom menu MSCRM provides CustomMenu tag that can be introduced in the ISV.config at the following locations:
  1. The MenuBar element inside the Grid can contain an ActionMenu element and one or more Button elements.
  2. The MenuBar element inside the Root or entity element can contain a CustomMenus element.



Adding Action Menu Links to Grid:


<grid>
<menubar>
<actionsmenu>
<menuitem title="required link 2" url="http://www.yourdomain.com/desiredfilenew.aspx" winmode="1">
<menuspacer>
</actionsmenu>
<buttons>
<button title="Test" tooltip="custom button" url="http://www.yourdomain.com/desiredActionfile.aspx" winmode="2" icon="/_imgs/ico_18_debug.gif">

<toolbarspacer>
</buttons>
</menubar>
</grid>




Adding Menu Links to Entities:


<entities>
<entity name="account">
<menubar>
<custommenus>
<menu title="Custom Menu">
<menuitem title="my file" url="http://www.yourdomain.com/desiredfile.aspx" validforupdate="1" validforcreate="0" availableoffline="false">
</menu>
</custommenus>
</menubar>
</entity>
</entities>



Adding Menu Links to Root

<!-- The main Global Menu Bar located at the top of all root level areas -->
<MenuBar>
<!-- Custom Menus that appear between the Goto Menu and the Help Menu -->
<CustomMenus>
<Menu>
<Titles>
<Title LCID="1033" Text="ISV" />
</Titles>
<MenuItem Url="http://www.microsoft.com">
<Titles>
<Title LCID="1033" Text="New Window" />
</Titles>
</MenuItem>
<MenuSpacer />
<!-- A horizontal drop down menu spacer -->
<SubMenu>
<Titles>
<Title LCID="1033" Text="ISV Tests" />
</Titles>
<MenuItem Url="http://www.microsoft.com" WinMode="2">
<Titles>
<Title LCID="1033" Text="Modeless Dialog" />
</Titles>
</MenuItem>
<MenuSpacer />
<MenuItem Url="http://www.microsoft.com" WinMode="1">
<Titles>
<Title LCID="1033" Text="Modal Dialog" />
</Titles>
</MenuItem>
<MenuSpacer />
<MenuItem JavaScript="alert('test');">
<Titles>
<Title LCID="1033" Text="Custom JavaScript" />
</Titles>
</MenuItem>
</SubMenu>
</Menu>
</CustomMenus>
</MenuBar>

Monday, February 2, 2009

Error messages in CRM

Most of us while working on CRM, faces error codes returns by CRM. CRM does give you error messages every now and then. The message is usally in the format of "0x12345678". The numbers do not tell much, but the corresponding error message do help you definitely. These error messages are given in the SDK and on a lot of places on the internet, but there the "0x" has been removed from the error message. Here is the same list as which is listed in the SDK, but now with the included 0x, posted by Ronald in his blog.

Do you wanna get rid of "Do you want to close this window?"

I always got this annoying question whenever i opened CRM untill I found the below mentioned code posted by Ronald Lemmen on his blog post here , but its no more now, cheers to Ronald.
You might get a question everytime you open CRM in Internet Explorer.
The question is:
The webpage you are viewing is trying to close the window.
Do you want to close this window?
yes no
This message does appear in CRM 4.0 only when you are using
Internet Explorer 7.0 and you have enabled the application mode setting. Nevertheless, it is an anoying message which you can get away!To get rid of this
message:
open the default.aspx file which resides in the root of the CRM website.
In this file there are these three lines of code:

var oMe = window.self;
oMe.opener =
window.self;
oMe.close();

Modify the second line of this snippet
and end up with these three lines:

var oMe =
window.self;
oMe.open('','_self','');
oMe.close();


You now will not have the message anymore.
Note:Keep in mind that any update or migration might remove this change, but you should be able to reapply the change easily again.

Metadata Browser

The Metadata Browser is a set of web pages which lets you view an Organization’s Entities, Attributes and Relationships.
You can see a quick overview of the metadata for your organization by using the metadata browser. This live view of the metadata, which shows only published information, is found here:

http://yourservername[:port]/yourorganizationname/sdk/list.aspx

You can use this to view the definition for all entities and attributes in your organization, both system and custom.
If you click an icon in the Definition column, you will see a view of all the attributes in the selected entity. At the top of this view you can view the ownership type of the entity, its type code, whether it is customizable, and if it is valid for Advanced Find.
For each attribute you can view its type, whether it is valid for create, update, and retrieve operations, and so on.

Retrieving the Web Service Version

The Web service version is needed to support ISV applications that can easily detect and work with multiple versions of Microsoft Dynamics CRM. The RetrieveVersion message provides support for determining the version, or build number, of the Microsoft Dynamics CRM software installed on the server.
Example : The following code retrieves the version of the server software and produces output like this: "4.0.7283.0"



// Set up the CRM Service.
CrmAuthenticationToken token = new CrmAuthenticationToken();
token.AuthenticationType = 0;
token.OrganizationName = "AdventureWorksCycle";
CrmService service = new CrmService();
service.Url = "http://<servername>:<port>/mscrmservices/2007/crmservice.asmx";
service.CrmAuthenticationTokenValue = token;
service.Credentials = System.Net.CredentialCache.DefaultCredentials;

RetrieveVersionRequest versionRequest = new RetrieveVersionRequest();
RetrieveVersionResponse versionResponse = (RetrieveVersionResponse)service.Execute(versionRequest);
Console.WriteLine(versionResponse.Version.ToString());