11 May 2011

Microsoft Dynamics CRM 2011 Practice Exams

So Microsoft are releasing the exams for Dynamcs CRM 2011, currently there are two availabile:




There will be more to follow so I'll try to keep this page upto date.

In terms of getting ready for the exams there are instructor led and e-learning courses available from Microsoft, or you can find all the information you need from the implementation guide and SDK. However how do you know when you're ready to take the exam, the answer is to take practice exams.

Here is a link to the accelerated ideas web-site which offers free practice exams including for the above CRM 2011 exams. I've not taken the proper exams yet but the practice one seems to be asking the sort of questions that I think will be asked in real life.

CRM 2011 JScript IntelliSense

So I've been messing around with CRM 2011 and one of the big things that I like is the Web Resources. It's much nicer to be able to write JScript in Visual Studio rather than the script window in previous versions of CRM.

The only draw-back that I've found is that you need to remember the syntax for the Xrm.Page object. Well help is at hand from PatrickVerbeeten.com

The page shows a link to a js file which you can reference within your JScript files to get IntelliSense.

Happy JScripting....

28 February 2011

Create a WCF Web Service

The following instructions were taken, mostly, from Eric White's blog on MSDN.

The point of this post is to offer a simply no frills guide to getting a WCF web service created and working.

1. There is is some setup that needs to be done before the first WCF service can be created, I'll skip these steps here. For further information check Eric White's blog.

2. Create a folder that will host the web service, e.g. c:\myWebService

3. Open Visual Studio 2010 (or 2008).

4. Click File --> New --> Project.

5. Select the WCF Template category, and WCF Service Application.

6. Set the target .NET Framework.

7. Un-tick "Create directory for solution".

8. Name the project.

9. Choose the location that was created in step 2.

10. Debug through Visual Studio to confirm that the Web Service is working.

11. Open Internet Information Services (IIS) Manager.

12. Create an application pointing to the new Web Service.

13. Change the Authentication so that "Anonymous Authentication", "ASP.NET Impersonation", and "Windows Authentication" are Enabled.

14. Confirm that the application pool user has rights to the WCF folder.

15. Add the .svc file to the Default Document list.

16. Browse to confirm that the service is working through IIS.

08 December 2010

Force CRM 4.0 Record Deletion

As standard CRM 4 deletes records, marked with deletionstatecode=2, on a 24 hourly basis.

Mitch Milam has written, an unsupported, utility that forces the deletion. The utility can be downloaded from his blog: http://blogs.infinite-x.net/2009/08/26/free-utility-run-crm-deletion-service. After installing the utility the exe can be found in \Program Files\CRM Accelerators\Run CRM Deletion Service.

There is also a utility, by Microsoft, that allows you to change the frequency of deletion and re-indexing. This utility is called Scale Group Job Editor. This tool can be downloaded from: http://code.msdn.microsoft.com/ScaleGroupJobEditor

24 November 2010

Import Organisation, change to default, gives Invalid User Authorization Error

When importing an organisation into Dynamics CRM 4.0 and making it default you sometimes come across the "Invalid Authorization error" message even though you're logged in as the System Administrator.

The following TSQL should be run on the SQL instance that hosts the CRM databases. It isn't a supported fix and I take no responsibility if it breaks your system. Remember backups are your friend!

The scripts have been taken from other resouces on the t'internet, but I can't remember where. When I find out I will acknowledge the original authors hard work.

-- Import Organisation, change default, gives Invalid User Authorization error
-- To Resolve this issue it is necessary to change the user's default organisation

--STEP 1
DECLARE @Org nvarchar(50)
set @Org = 'MSCRMORGNAME'

DECLARE @OrgDb nvarchar(150)
set @OrgDb= @Org + '_MSCRM'


DECLARE @UserName nvarchar(50)
set @UserName='DOMAIN\username'

execute ('select OrganizationId from ' + @OrgDb +'..organization where name=''' + @Org +'''')
execute ('select systemuserid, DomainName from ' + @OrgDb +'..SystemUserBase where DomainName='''+ @UserName + '''')


--STEP 2
-- User the systemuserid returned to get the correct GUID
select userid from MSCRM_CONFIG..systemuserorganizations where crmuserid = '[systemuserid]'

-- Use the userid to return the correct
select DefaultOrganizationId from MSCRM_CONFIG..systemuser where id = '[userid]'

--Use the DefaultOrganizationId and userid to update the table
update MSCRM_CONFIG..systemuser set defaultorganizationid = '[DefaultOrganizationId]' where id = '[OrganizationId]'

10 November 2010

CRM 4 ISV Web App Error Out

Sometimes when a web application has been deployed to the ISV folder within CRM it doesn't work instead it gives a Runtime Error.

To resolve this the web application's web.config file needs to be updated to include the following (immediately above the tag: </httpModules>)

<remove name="CrmAuthentication">

Note: You will probably need to comment the line out if you're testing the code through Visual Studio.

This is necessary because the ISV web application is inheriting from the parent CRM web site.

Hosting a virtual app With a Different .Net version

An error will occur if you try and host a web application within a web site and mix the .Net versions. This is because the virtual application will attempt to inherit from it's parent. This can be switched off by editing the parent web.config as follows:

Wrap <system.web> with:
<location path="." inheritinchildapplications="false">

For Example:

<location path="." inheritinchildapplications="false">
<system.web>
...
</system.web>
</location>