How to connect Scribe to CRM2011 Online

Scribe by default has a CRM adapter to connect to Microsoft Dynamics CRM. Now with the release of CRM2011, Scribe is working on a specific CRM2011 adapter. However, with the current CRM adapter it is also possible to connect to Dynamics CRM 2011 (online and on premises). Just for your information, the new adapter will be ready very soon (end of this month?).

While testing Scribe with CRM 2011 Online I had however a small issue to connect. This problem was quickly resolved by browsing the Scribe knowledge base. So If you are unable to connect to CRM 2011 Online using Scribe, try the following:

You need to add two strings to following registry locations (depending on your OS):

32-bit Scribe Servers

HKLM\SOFTWARE\Scribe\Adapters\DynamicCRMAdapter

64-bit Scribe Servers

HKLM\SOFTWARE\Wow6432Node\Scribe\Adapters\DynamicCRMAdapter

Here are the things you need to add:

String Value Name:  CrmOnlineUrlOverride

Value:   https://dev.crm4.dynamics.com

String Value Name:  PassportPartner

Value:  crm4.dynamics.com

If there are any problems, let me know

How to disable the Get Started pane in CRM2011

You probably have noticed that CRM2011 now comes with a very handy pane at the top showing tips&tricks, videos etc. to help you work with CRM2011. This is truly a great help if you are just getting started with CRM2011. If you however have a little more experience with CRM2011 and you were wondering if you could disable or hide this pane. Yes you can! You can do it on a personal or user level or organizational (then it will be disabled for all the users in CRM2011 regardless of their personal setting).

If you don’t know what I’m talking about, see the image below Glimlach

image

Disable it on user level

Go  to File – Options

image

There on the “General tab” you change the setting.

image

Disable it on organization level

Go to Settings – Administration – System Settings

image

And again on the “General tab” you can change the setting

image

Creating a calculated field in Dynamics CRM2011

In this short post I’ll explain to you how you can create a calculated field in dynamics CRM2011. It’s actually just the same as in CRM4. The only thing now is that we have to use web resources. Web resources is new in CRM2011 and needs to be used whenever it comes down to using resources (like JavaScript) in dynamics CRM.

Ok lets start:

1) First create some fields. For this demo I’ll use: val1, val2 and result

image

2) The calculation will be a simple multiplication. I’ll multiply val1 and val2 and output the result in the result field.

3) Now we need to create the JavaScript that will do the actual calculation of the fields.

   1: function calculate()

   2: {

   3:     var val1 = Xrm.Page.entity.attributes.get['new_val1'].getValue();

   4:     var val2 = Xrm.Page.entity.attributes.get['new_val2'].getValue();

   5:     

   6:     if(val1==null)return;

   7:     if(val2==null)return;

   8:  

   9:     var result = val1 * val2;

  10:     Xrm.Page.entity.attributes.get['new_result'].setValue(result);

  11: }

Mind the new Xrm page model functions that I’m using. More information can be found on MSDN.

A little more information on the JScript. First I grab the data from both fields, check if they are not null and then do the actual calculation. Finally I set the result for the “calculated field”.

4) Now we need to add the JavaScript as a Web Resource. Go to the Web Resource section (Settings – customizations – Customize the System – Web Resources).

5) Add a new Web Resource. Here you can give a name, description etc. For the “type”, select Script (JScript). Finally click on the button “Text Editor” and add the code we’ve created above.

image

6) Once the Web Resource is created and published we can use it in our Account form where the custom fields are located.

7) Customize the form and select “Form Properties”. We first need to make the Web Resource available in this specific form.

8 ) Under the Events tab, add the Web Resource that we just created.

image

9) All that’s left to do is to configure the onChange events for the two fields and we’re done. Doubleclick on the field val1 and val2, go to the Events tab and configure the onChange event. The final result for each field should look like this:

image

10) Publish the form and you’re ready for testing.