Wednesday, February 28, 2007

Callouts in Service Provider Edition of Microsoft CRM 3

Finally!
I got it to work, and it actually wasn't too difficult when I got hold of the correct DLL:s. So, first hot tip, right out the furnace:

"When developing for CRM Service Provider Edition, make sure you got CRM Service Provider Edition versions of your dll:s".

This can actually be a bit problematic when working in a development environment on a VPC since it is quite rare to have the entire Hosted Environment, like Hosted AD, Hosted Exchange etc on your virtal machines. If you do, great, use it, but I would guess that most of you don't.

I will give you a short walkthrough of how to create a post callout using the CRM Service Provider Edition. I will focus mainly on the differences between developing a normal callout and one for for CRM SPE.

First off, copy the file Microsoft.Crm.Platform.Callout.Base.dll from the CRM SPE CD 1 (\bin\Assembly). Put it somewhere where it is possible to add a reference to it. Like c:\temp.
Now, add a reference to it in the project.

Modify the callout.config.xml file just like you usually do, for instance:
<callout.config version="3.0" xmlns=" http://schemas.microsoft.com/crm/2006/callout/">
<callout entity="account" event="PostUpdate">
<subscription assembly="CalloutLibrary.dll" class="CalloutLibrary.AcctCallouts" />
</callout>
</callout.config>

Create a class file called AcctCallouts in the namespace CalloutLibrary and make sure the dll is called "CalloutLibrary.dll". (If you name your project CalloutLibrary, this will be default).

using System;using Microsoft.Crm.Callout;
using System;using System.Data;
using System.Net;
using System.Web;
using MSAB.CalloutLibrary.CRMSDK;
using Microsoft.Crm.Callout;
using System.Globalization;
using System.IO;


namespace CalloutLibrary
{
public class mbaktivitet: CrmCalloutBase
{
private CrmService service;
private WhoAmIRequest userRequest;
private WhoAmIResponse user;

public override void PostCreate(
CalloutUserContext userContext,
CalloutEntityContext entityContext,
string postImageEntityXml)
{
string usr = "
username@test.local";
string pwd = "1m0rePassword";
string HostedCRMurl ="http://crmserver.hostingcompany.com";
service = new CrmService();
service.Url = HostedCRMurl + "/mscrmservices/2006/crmservice.asmx";
service.CookieContainer = new CookieContainer();

service.CookieContainer.Add(GetCRMCookie(HostedCRMurl, usr, pwd));

//Make sure the webservice works
userRequest = new WhoAmIRequest();
user = (WhoAmIResponse) service.Execute(userRequest);
}
}
}

The important call here is the GetCRMCookie(HostedCRMurl, usr, pwd), a method that I will describe bellow which returns an authentication cookie that can be used to authenticate against the web service. Here is its definition, it is more or less what Arash has written on his blog concerning how to write web services for CRM SPE.

public Cookie GetCRMCookie(string url, string userName, string password)
{
DebugText("Start of GetCRMCookie");
Cookie authCookie;
try
{
Uri serverUri = new Uri(url);
Uri logonServerUri = new Uri(serverUri, @"LogonServer/Logon.aspx");

string encodedUserName = HttpUtility.UrlEncode(userName);
string encodedPassword = HttpUtility.UrlEncode(password);
string logonServerUrl = String.Format(CultureInfo.InvariantCulture, "{0}?UserName={1}&Password={2}", logonServerUri.ToString(), encodedUserName, encodedPassword);

// Make a web request that does not allow redirection
HttpWebRequest logonRequest = (HttpWebRequest)WebRequest.Create(logonServerUrl);
logonRequest.AllowAutoRedirect = false;
logonRequest.CookieContainer = new CookieContainer();
HttpWebResponse logonResponse = (HttpWebResponse)logonRequest.GetResponse();
authCookie = null;

using (logonResponse)
{
if (HttpStatusCode.Found != logonResponse.StatusCode)
{
// throw new CrmException(logonServerUrl, ErrorCodes.InvalidOperation);
}

if (null == (authCookie = logonResponse.Cookies["CRMAuthCookie"]))
{
// throw new CrmException(logonServerUrl, ErrorCodes.InvalidOperation);
}
}

// Now we have the cookie, make sure the credential is valid by passing the cookie back to CRM
logonRequest = (HttpWebRequest)WebRequest.Create(serverUri);

// The following user agent is required by CRM
logonRequest.UserAgent = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2)";
logonRequest.AllowAutoRedirect = false;
logonRequest.CookieContainer = new CookieContainer();
logonRequest.CookieContainer.Add(authCookie);

logonResponse = (HttpWebResponse)logonRequest.GetResponse();

using (logonResponse)
{
if (HttpStatusCode.OK != logonResponse.StatusCode)
{
throw new InvalidOperationException(logonServerUrl);
}
}
return (authCookie);
}
catch (Exception err)
{
return null;
}
}

That’s about it. Using this technique, you should be able to get your SPE Callouts to work.

Make sure that the callout.base is exists in the servers GAC, if not, copy it there.

Note that post-callouts, won’t break the execution if there is an error but they will leave the error exception sprecification in the eventlog so make sure you have a look at it.

So, in short, there are two main differences when developing callouts that use web services when comparing normal CRM with SPE CRM, they are:

- DLL:s are unique. The version number for SPE is 3.0.5745.0 while the version for the normal CRM is: 3.0.5300.0.

- To authenticate, you cannot use the normal System.Net.CredentialCache.DefaultCredentials but, you have to use the “slightly” more complicated method of capturing the authentication cookie and using it to log in.

As you might have noticed in the code, the user is hard-coded, which means that there will not be any impersonation in the way it works in normal CRM. I have an idea of how this might be solved; by creating a new aspx-page to capture the username and password, creating a cookie using these credentials and then storing it in the session variable to enable further loggin in later with the webservice. One would also have to make sure that the cookie can be used by the normal IE klient as well. As you might understand, there are some question marks here that I will try to straighten out. If I find a solution to impersonation in CRM SPE, I will be sure to create a post about it!


Gustaf Westerlund
CRM and SharePoint Consultant

Humandata AB
www.humandata.se

Tuesday, February 27, 2007

Service Provider Edition / Hosted CRM

I'm currently working with a customer who's got a service provider edition of Microsoft CRM.

I am developing callouts and will write some more about what the differences are, for now I will leave you with a reference to a blog that actually mentiones something about this.

For one, there is a different version of Microsoft.Crm.Platform.Callout.Base.dll and there is a different way of authenticating when using the webservice. I will write I bit more about it later.

Have a look at this blog for now: Microsoft.Crm.Platform.Callout.Base.dll

http://crm.davidyack.com/journal/2006/7/21/callouts-and-the-service-provider-edition.html

Gustaf Westerlund
CRM and SharePoint Consultant

Humandata AB
www.humandata.se

Import of customizations not working in IE 7

As Sonoma Partner, one of the most competent CRM partners, has noticed, as I have also done, there is a problem and a fix for it. The problem being that the progress dialog that shows up when importing customizations doesn't go away when using IE 7. Please read more at the Sonoma partner blog:

http://blog.sonomapartners.com/2007/01/importing_custo.html

Gustaf Westerlund
CRM and SharePoint Consultant

Humandata AB
www.humandata.se

Wednesday, February 21, 2007

How to create many-to-many relationships in CRM

As many of you know, only one-to-many and many-to-one relationships can be created in Microsoft CRM 3. To create many-to-many relationships, the most commonly used technique is a "middle" entity, or mapping entity. However, there are several other options for the more pragmatic customizer. Please refer to the CRM-Team blog post:

http://blogs.msdn.com/crm/archive/2007/02/15/many-to-many-relationships-in-ms-dynamics-crm-3-0.aspx

Gustaf Westerlund
CRM and SharePoint Consultant

Humandata AB
www.humandata.se

CRM Analytics foundation

The analytics foundation for Microsoft CRM has been released. It is a platform for business intelligence based on CRM Data. It contains OLAP cubes, dashboards and more. Please have a look at the codeplex homepage for more information:
http://www.codeplex.com/crmanalytics

Gustaf Westerlund
CRM and SharePoint Consultant

Humandata AB
www.humandata.se

Monday, February 19, 2007

MOSS and CRM Webparts

I was reading around a bit and found a blog posting concerning how to make the CRM-webparts work in MOSS. It seems you have to install them the same way you installed the CRM-webparts in the Swedish SharePoint v.2, earlier, i.e. by extracting the files from the cab and installing them manually.

Please click this posts heading to go to the posting I found.

Gustaf Westerlund
CRM and SharePoint Consultant

Humandata AB
www.humandata.se

IFrame security problems

I recently wanted to show a dynamic SQL RS report in CRM using customization of the sitemap.

I had some problems with the dymanic functionalities of the report, which didn't work. After some work, I found that it was due to the fact that the Reporting Server had the wrong security settings in IE, and hence was prohibited to fully use the JavaScripts that controlled the drill-down of the reports. The simple solution was to add the reporting server to Local Intranet Sites in IE.

Gustaf Westerlund
CRM and SharePoint Consultant

Humandata AB
www.humandata.se

Monday, February 05, 2007

How to create .NET-class files from xsd files

XML is great! But most of you who have worked with it probably pull your hair out due to all the navigational problems and code needed to navigate through the xml-structure. Wouldn't it be neat if there was some way to create a .NET class from an xsd-schema and load it up with the contents of a specific xml-structure? Well, guess what, there is, and it is provided by our very good friends in Redmond, WA, Microsoft.

To some of you, this might be yesterday’s news, but for those of you who havn't tried it, you should.

I will try to explain how to do it here. In this example, we'll be basing the .NET class on a InfoPath form. InfoPath is, as you might know, just a front-end to XML, ie. a user friendly way of creating xml-data.

Create you xml-form in any way you like. I won't go into how exactly you do that, but
That will create a schema in the background. To export it to an xsd-file, select “Save as source files…” from the file menu and direct it to a directory of your choice, for instance, “c:\temp”.

Use the file explorer, go to the directory where you just saved the files, and you will find a file with the name of your different data sources followed by the extension “.xsd” in this directory. Remember the name of the xsd-file, let’s call it “source.xsd” in this example.

Then, start up a “Visual Studio 2005 Command Prompt”, go to the directory where you saved the source files, for instance:

cd c:\temp

Then, using the command xsd you can create the cs-file containing the .NET-class with the following command:

xsd source.xsd /c

This will create a new file called “source.cs”. This is the file that contains the .NET class.

Now open your development project and add the file source.cs to the project. This will now give you access to the .NET class in you project. Open the file and you can see the name of your class, it should be “myFields”.

Now we want to instantiate the class with some xml-data. This is done in the following manner using c#-code.

XmlSerializer serializer = new XmlSerializer(typeof(myFields));
XmlTextReader reader = new XmlTextReader(“c:\XmlInstanceOfSourceXsd.xml”);
myFields fields = (myFields)serializer.Deserialize(reader);

Now, you can access the xml-data using the instance fields of the class myFields.

Gustaf Westerlund
CRM and SharePoint Consultant

Humandata AB
www.humandata.se

Wednesday, January 31, 2007

News about Titan

Microsoft has released some more news about Titan, the codename for the next version of MS CRM, 3.5, 4 or 5, only the future will tell what it will be called :)

In the article from MS (click the heading of this post) they mention that they are planning to release Titan in mid 2007. The last release for version 3, was actually ahead of schedule so, I believe we could actually expect it to arrive in Q3 2007.

Some of the new features that are rumored to be found in Titan are multi-language (in the same installation) and multi-currency. Features that will enable MS CRM to move into the league of the more international companies.

When I hear more, I will surely let you know!

Gustaf Westerlund
CRM and SharePoint Consultant

Humandata AB
www.humandata.se

Tuesday, January 30, 2007

How to create an CRM email with a report server attachment as a pdf

In Microsoft CRM there are several methods to create great looking documents with mailmerge and the crm emails can be created with dynamic data. However, it is quite complicated to create automatic mails with data from one main entity and several sub entities. The most common example being an order confirmation, with data from both the order head and the order detail lines.

To make it a bit flexible, I created a function that could be called from the workflow engine.

Here is the method declaration that I will use bellow:

public string SendMailWithReport(System.Guid OrderId, string subject, string body, string reportpath, string callerXml)


The parameters are as follows:
OrderId – A Guid containing the orderid to be used as a parameter to the report.
Subject – a string that will contain the mail subject.
Body – a string that will contain the mail body
Reportpath – to make it a bit more flexible, the report path is not hard coded but can be inputed as a parameter,
callerXml – standard handling for getting the caller data to enable impersonation.

The first thing we want to do is to get the pdf from the report server.

We’ll store the binary pdf in the byte-array called result. When this is done, we’ll encode this into a string called encoded data. The rest is stuff that is needed to make this happen.

string encodedData = "";

//Create Report PDF
ReportingService rs = new ReportingService();
rs.Credentials = new System.Net.NetworkCredential(username, passwd, domain);
Byte[] result;

string encoding;
string mimetype;
ParameterValue[] parametersUsed;
ParameterValue[] parameters = new ParameterValue[1];
parameters[0] = new ParameterValue();
parameters[0].Name = "CRM_OrderId";
parameters[0].Value = "{" + OrderId.ToString() + "}";

Warning[] warnings;
string[] streamids;

result = rs.Render(reportpath,
"PDF",
null,
null,
parameters,
null,
null,
out encoding,
out mimetype,
out parametersUsed,
out warnings,
out streamids);

encodedData = System.Convert.ToBase64String(result);

The most complex part of this which took me the most time, was the “Render” method of the reporting server web service. I use it this way because it works, don’t ask me what all the parameters really are, I don’t know.

The next part is to create the CRM mail. This is quite straight forward, if you are used to the crm web service.

The “from” and “to” can be set to anything that can be used as a “to” or “from” in the CRM GUI.

CrmService service = new CrmService();
service.CallerIdValue = new CallerId();
service.CallerIdValue.CallerGuid = GetCaller(callerXml);
service.Credentials = System.Net.CredentialCache.DefaultCredentials;

//Get current user
WhoAmIRequest userRequest = new WhoAmIRequest();
WhoAmIResponse user
= (WhoAmIResponse) service.Execute(userRequest);

//Load salesorder and account objects.
salesorder so = (salesorder)service.Retrieve(EntityName.salesorder.ToString(), OrderId, new AllColumns());

account acc = (account)service.Retrieve(EntityName.account.ToString(), so.customerid.Value, new AllColumns());

email em = new email();
activityparty from = new activityparty();
from.partyid = new Lookup();
from.partyid.type = EntityName.systemuser.ToString();
from.partyid.Value = user.UserId;
em.from = new activityparty[] {from};

activityparty toparty = new activityparty();
toparty.partyid = new Lookup();

toparty.partyid.type = EntityName.account.ToString();
toparty.partyid.Value = acc.accountid.Value;

em.to = new activityparty[] {toparty};

em.subject = subject;
em.sender = "test@test.com";
em.regardingobjectid = new Lookup();
em.regardingobjectid.type = EntityName.salesorder.ToString();
em.regardingobjectid.Value = so.salesorderid.Value;

em.description = body;
em.ownerid = new Owner();
em.ownerid.type = EntityName.systemuser.ToString();
em.ownerid.Value = user.UserId;

Guid createdEmailGuid = service.Create(em);

Now, we have created the email. You can see it in CRM if you like.

The last part is now to create the attachment on the email as the pdf that we downloaded from the report server in the first part of this walk-through.

activitymimeattachment ama = new activitymimeattachment();
ama.activityid = new Lookup();
ama.activityid.type = EntityName.email.ToString();
ama.activityid.Value = createdEmailGuid;
ama.body = " ";
ama.mimetype = "application/pdf";
ama.attachmentnumber = new CrmNumber();
ama.attachmentnumber.Value = 1;
ama.filename = "A filename";
Guid createdAttachment = service.Create(ama);

//Upload file
// Create the Request Object
UploadFromBase64DataActivityMimeAttachmentRequest upload = new UploadFromBase64DataActivityMimeAttachmentRequest();

// Set the Request Object's Properties
upload.ActivityMimeAttachmentId = createdAttachment;
upload.FileName = "attachmentfilename.pdf";
upload.MimeType = "application/pdf";
upload.Base64Data = encodedData;

// Execute the Request
UploadFromBase64DataActivityMimeAttachmentResponse uploaded = (UploadFromBase64DataActivityMimeAttachmentResponse) service.Execute(upload);

The last part, if you want to, is to send the mail:

SendEmailRequest req = new SendEmailRequest();
req.EmailId = createdEmailGuid;
req.TrackingToken = "";
req.IssueSend = true;
SendEmailResponse res = (SendEmailResponse)service.Execute(req);

I have made some simplifications, like removing try-catch clauses, which you really should use, but the code has apart from that been cut-n-pasted from a working application and should work.

Gustaf Westerlund
CRM and SharePoint Consultant

Humandata AB
www.humandata.se

Thursday, January 25, 2007

A question from a CRM admin

I recieved this question by email from one of the readers of this blog and thought that I might aswell let all of you in on the answer. (I've take the liberty to remove his name and to correct a few typos).

---
Hi Gustaf,
Let me introduce myself, I am XXX new to MS CRM. I got your mail id through your blog.I am mailing you as we have a urgent query with respect to mscrm. We have a company domain, which is being used by the entire organisation, now if i am going to install MS CRM 3.0 Server setup do we need to have a different domain/domain controllers for the CRM. Are their any issues which must be taken care of before going ahead, as we will be dealing with the live domain. The objective of this is to integrate with sharepoint technologies. I will be thankful for your earlier response.

Regards, XXX

---- My answer:

Hi,
When you install MS CRM 3 it will add a few groups to the AD, but apart from that will not touch the AD. MS CRM:s user handling and security information is stored in the MS CRM database hence no need for further schema extensions of the AD.

I understand your concern when installing on a live domain but there should not be any problems. If you still feel a bit worried, you can always install MS CRM in a virtual environment and see the changes for you self.

The live CRM server should be installed in the company domain.

Kind regards,
Gustaf

------

If your question is in regard to something I've posted on the blog, please add it as a comment, otherwise, you can always mail me. Please note that I will gladly answer technical questions like the one above but it is not feasable for me to design you solution. If you want my help in that aspect, please contact Humandata (www.humandata.se) and we can get you a good deal. I hope you appreciate that even I need to have a house to live in and food for my family :)

Gustaf Westerlund
CRM and SharePoint Consultant

Humandata AB
www.humandata.se

Back again - with a question

Well, as some of you might have noticed, not much has happened on this blog for the last 3 weeks which has been due to the fact that I've been on my honeymoon in Thailand and frankly didn't start CRM och SharePoint even once :).

I've tried to find out a bit more about the upcoming integration engine CRM-Nav from Microsoft but have not been very successful. The main question is what kind of infrastructure it will be based on and I think the following three are the hottest tips:

1. Celenia/Tectura - The integration formerly known as Tectura, (see my previous postings), now called the Celenia CRM-Nav integration, has previously been put forward by Microsoft as THE integration engine to use.

2. BizTalk based integration - BizTalk is the talk of the town concerning integration, and it would not be very strange if the integration would be BizTalk based.

3. New/Custom - They might just have sat down and started from scratch and written an integraiton engine specifically for CRM-Nav.

Well, where's my money? To start off, Microsoft have been very very quite about this integration engine, would seem a bit strange if the engine would be according to 2 or 3 above, when there really would be no reason for that.

However, if they are up to an aquisition of Celenia or just the program, then they would probably like to be just very very quite about it until all the formalities had been settled.

Another reason for not going along with 2, the BizTalk version, is that it would require an installation of BizTalk at each customer which might cause more problems and costs than what is reasonable.

One reason for not choosing 3 is that it most probably will be quite costly.

Something to take into consideration in the Celenia business is that the integration engine was previously owned by Tectura (although it had been developed by Celenia) but for reasons unknown to me, was reverted to Celenia. Most probably after considerable preasure from Microsoft.

Bottom line, my money is on the Celenia integration (1). Which versions of Nav it will support is still unknown and if it will still only be a technical integration is also still unknown, when I learn more, I will let you know.

Gustaf Westerlund
CRM and SharePoint Consultant

Humandata AB
www.humandata.se

Monday, December 18, 2006

IT-Proffs - CRM

This is a posting directed at all swedish speaking readers!

If you havn't already been there, check out the swedish forum called IT-Proffs, it has (as far as I know) the only Swedish CRM forum. You will find me and several other talented and skilled CRM-professionals there like Jonas Deibe (Microsoft Sweden).

Apart from the global CRM-forum/newsgroup hosted by Microsoft, this is a bit smaller which makes it easier to handle, and doesn't flood you inbox.

Please note that you can set an automatic notification when a new messsage is added to the CRM-Forum. I hope to see you there soon! www.itproffs.se

Gustaf Westerlund
CRM and SharePoint Consultant

Humandata AB
www.humandata.se

Friday, December 15, 2006

SharePoint inside Outlook using Sitemap configuration in CRM.

During the latest project i was involved in, we wanted to show SharePoint v3 pages in Outlook using sitemap customizations in CRM. This worked great at first (we didn’t really test it), but after a while, when we started using it a bit more we sometimes got the following error message “MSO.DLL is not compatible with Outlook”, ending with an OK-button. Pressing it, made Outlook exit in error. Not very nice.

I don’t know exactly why this happened but I think it happens due to the loading of some active-X components that are not supported by the web browser in Outlook, which for some reason doesn’t seem to be IE. If anyone knows anything more about this, please let me know.

Oh, I forgot, we were using Outlook 2003 since V3C isn’t publicly released yet. Perhaps you won’t get this error if using Outlook 2007 since it is probably more compatible with SharePoint v3.

Gustaf Westerlund
CRM and SharePoint Consultant

Humandata AB
www.humandata.se

Wednesday, December 13, 2006

Unable to access System Settings - weird error

I’ve had a lot to do lately why, there hasn’t been to much action here. I was involved in a Proof-of-concept for Microsoft CRM, SharePoint 2007, EPM 2007 and a few other products aswell. Very interesting work, but it left me a bit behind on the blog-front.

Well, as most of you probably already have heard, there is a Update Rollup containing lots of the hot-fixes previously released and also a few more features – like being able to set which attributes should be searchable in advanced find. You can download it here.

When working on the POC mentioned above I stumbled on a strange error. CRM worked fine (not the reports though, I found out at a later stage), but when I tried to access System Settings I got a really weird error message containing html-code. What had happened was this.

The VPC I was using had WSS v2 installed on port 80. I installed CRM on port 5555 (reporting services had been installed into port 80 /Reports and /ReportServer). After this I installed Enterprise Project Management (EPM) (i.e. WSS v3 with EPM addon), set it to work on port 80, thinking it would overwrite the existing WSS v2 and let Report Services work as it should. Utopia, this is not what happened.

What really happened was that EPM/WSS had switched off WSS v2 on port 80 and created a new website for port 80 (no host header). In other words, also switching off Reporting Services. When I tried to access System Settings in CRM, it tries to access Reporting Services for some of the settings and since WSS v3 was installed, it handled the call and returned an html-page displaying that the resource wasn’t available. This was handled by CRM as an exception and the content of the html-page was displayed in the error (as html-code).

So, what should I have done?
Uninstall WSS v2, install EPM/WSS v3, reinstall SQL RS, install CRM. Then I probably wouldn’t have experienced the problem I had above.
Use hostheaders to separate the different websites as suggested from Microsoft Swedens CRM guru Jonas Deibe.
I hope you don’t have to experience the same problem, since the only solution I feel works, is to reinstall.

Gustaf Westerlund
CRM and SharePoint Consultant

Humandata AB
www.humandata.se

Friday, December 01, 2006

Microsoft CRM and Excel 2007

I've recently been assembling a demo for the Microsoft CRM / IW team in Sweden for the launch of Vista and Office 2007. The new V3C client is great but the one I could use was a beta and was a bit buggy.

One of the features of Microsoft CRM that many managers (and others) like is the Excel-button on lists. However, with Excel 2007, it doesn't work out of the box. For the demo, I got it to work by doing the following actions. Please note that these actions should only be used in a demo environment since they severely alter some of the security settings of Excel. When I find a better way to handle this (or if I find some one else that does), I will let you know.

1. Make sure you are running Excel as a user that has access to the CRM database. This is due to the fact that Excel will try to access the database directly and it wont work properly if you don't have access. The best way is to use a client computer that is part of the domain and a user that is a CRM user. That usually solves it.
2. Add "c:\users" to the trusted places in the trust center.
3. Set "Trust all incomming connections (not recommended)" in the trust center.

Now it should work. Sometimes it takes Excel a while to get the data from the server, so be a bit patient. When I wrote this, I didn't have access to a test environment with CRM and Excel 2007 so I might have some details wrong (like the exact naming of fields in trust center).

I hope it works for you, Microsoft CRM 3 with the new Excel 2007 with conditional formating will blow the socks off any Manager I know... :)

Gustaf Westerlund
CRM and SharePoint Consultant

Humandata AB
www.humandata.se

Friday, November 17, 2006

Workflows and the user they run as

I would just like to make you aware of the following fact:
- Workflows run manually, are run as the current user.
- Workflows triggered by "Create", are run as the user who created the workflow.

This is true for the normal workflow methods and mostly concerns "Modified by". Ex. Modified by will be wrong if a Workflow updates an entitity after it has been created. (unless the same person created the workflow and the entity).

I havn't checked if this is true when using impersonation in custom workflow assemblies aswell, but I would imagine it is. The way to handle it is to set the service.CalledIdValue to the user you want to be the modifier.

Gustaf Westerlund
CRM and SharePoint Consultant

Humandata AB
www.humandata.se

Friday, November 10, 2006

Offline client difficulties concerning customizations - be aware...

Hi,

I just wanted to discuss the problems concerning customizations and extensions concerning the outlook client in general and the offline client specifically.

When customizing CRM there are many different customization points, among the most important, callouts, or Business Logic Extension. These will work well on the desktop version of the Outlook client since it comunicates directly with the CRM server, in more or less the same way that the web client does. Please note my previous postings concerning how to handle the problem of the "Settings" menu, disapearing from the web-menu. In short, install the Outlook client to one URL and use the webclient on another, and your problem will be solved. It is due to caching problems in IE.

However, when using the laptop client in offline mode, all logic is handled in the client and the callouts are not run, as far as I know, not even when syncronization is done.

Concerning custom aspx-pages on a separate website, it might be possible to create a new site locally on the offline computer and let Casini handle that aswell, and the have special tags in sitemap and isv.config to handle the offline functionality. The webservice won't be available, so I don't know how much functionality you can really create. Perhaps, you can temporarily store some information and connect to the webservice when syncronization is done when the CRM-client goes online. How to connect to this and trigger it, I don't know.

In conclusion, I would like to suggest that you thouroghly revise each customization from the offline perspective and decide how to implement, block or leave out some funtionality on the offline client. To avoid problems with the customer, I would also suggest dealing with this at an early stage in the project.

Gustaf Westerlund
CRM and SharePoint Consultant

Humandata AB
www.humandata.se

CRM Exchange Router - facts and fiction

What does the CRM Exchange Router really do? There are many missconceptions on the subject and a recent posting on the CRM-Team Blog tries to rectify this. Very interesting reading, esspecially for installation of the Router in very controlled environments.

(Click the heading!)

Gustaf Westerlund
CRM and SharePoint Consultant

Humandata AB
www.humandata.se

Thursday, November 09, 2006

Tectura Nav - CRM connector is now Celenia

The Tectura CRM-Nav connector that I have blogged about earlier has been developed by the company Celenia in Denmark. Due to all the problems with the company Tectura, it has now been decided that Celenia will market, sell and support their product by them selves and not via Tectura. This is good news since Tectura has been very problematic to work with.

Click the heading to go to Celenia.


Gustaf Westerlund
CRM and SharePoint Consultant

Humandata AB
www.humandata.se