I hate Microsoft, really. Lets start from begining.
Last thursday a friend of mine asked me a question: "Is it possible to get Microsoft dynamics crm working with php? Send messages, etc.". I thought: "Never heard of it, but how hard it could be?" So I said, that I will look more into it that evening.
I started with parallels , because I wanted to do some other tasks, also and because of windows 7 beta installation on bootcamp disk. So I got parallels and installed xp. That went really nice and easy. I spent a little time enjoying parallels "Coherence" mode and started to look farther. I was already downloaded MSCRM server and Client (at this point I smelt something bad is coming, because of client and server installations).more
I understand that crm is working very closely with MS Outlook and MSSQL, so I installed MS Office and went to microsoft.com for mssql. I found MSSQL Express, which is for free, actually. After installing mssql I mounted crm server iso file and started installation.
Firstly I was introduced with a lot of "Required components". Ok, that is not so bad, press install and everything gets installed. After some time of waiting and "reboot required", but ignored and error dialog popping up, comes next step. I filled organization name, next, next, next and then error dialog: "IIS is not installed". That made me wonder, but ok, there is checkbox "Create a new Web site", next. Then appeared "Select SQL Server" page. Crm server setup didn't find it, so I just put in localhost and pressed "next". There was something about "reporting services", wtf? Ok, "next". And here came a joy. It asked me for "Organizational unit". I have heard that word set before, but I didn't want to agree with myself. So I pressed the button - "Browse" and got a message: "Unable to browse for Active Directory object". That wasn't so good, anymore. Next I opened up google and searched for something like this: "active directory windows xp" and got back site, where somebody has wrote something like this: "You can't get Active Directory on windows xp". I already knew it, even before pressing that "Browse" button.
I was thinking to myself: "OK!", and searched for windows server. First result was directing to microsoft web site, where I could download windows server beta version, so I did it. it was quite fast, installed, did it all again. Then something I don't remember, was not happy with windows 2008 server beta, this is where I started to become angry. "Ok, fine, fine." I searched again, downloaded windows 2003 server edition. This was not so fast any more.
So I had windows 2003 server iso file, now. Ok, I opened parallels, "New Virtual Machine", "next", "next", some configuration and done. Fresh windows 2003 server was installed and didn't let me to download a file from microsoft web site, because of security. After I somehow manage to get that file I installed MS Office and MSSQL 2008 express. Went to google, searched how to install Active Directory, even created one user in it. Then I mounted Microsoft dynamics CRM server, "install", "next", "next", "error dialog", "next", "next", "Browse". It shows up as neded, "ok", "next". Stop!! "Microsoft exchange", "WTF???" This is where I got really angry, but i told to myself: "there is no need for a panic!". Google: "install exchange server" -> downloaded exchange server, installed and there was some requirements in process, too, for example SMTP server, what is hidden somewhere in "Add/Remove windows components". Finally, reboot!
Mount MSCRM, "install", "next", "next". "Next" after "Exchange server" page - everything is ok. Setup was checking installation, here we go again. It told me, that something is wrong with database. I changed passwords, I changed service users and passwords, I was going mad, when I wrote a query for google: "microsoft dynamics crm 3 mssql 2008 express" and found link, where somebody wrote something similar to this: "in order to install microsoft crm you will need to get enterprise or standard version of mssql". At this point I understood: "that is microsoft, there is no point of being mad, just go, search for mssql 2005 enterprise, download it .. install and that's it". So I did!
Presuming that I had already installed mssql (too lazy to write those "next", "error", "next"), I was at last page of crm installation and everything was fine, so I pressed "install" button and after that "close" button. Then I was sitting in my chair and asking myself: "So that's it? It really went without any errors?" (with sarcasm, of course)
Next thing was, that I have to somehow connect to crm to actually do something with it. Somewhere between all those installations I found out, that it has soap module, server or whatever you call it. I just needed to find what url I have to connect. And you may guess, that it wasn't an easy step, too.
First thing I came accross, was msdn web site, there is something like documentation. So I walked around a little bit, found nothing and went to google, of course. :) Google said, that there is url like this: "http://localhost:5555/MSCRMservices/2006/crmservice.asmx", I opened it in Safari, it was asking for username and password. I entered tht usernames login information I created earlier, guess - it won't work. Aah.. After some searhing around I found out, that I need to add my users to CRM (or Exchange) server. So I did it and tried again, it worked. I got the page, with some little information about possible commands to the server. Of course it wasn't quite that I was looking for. So I googled again. I came accross link - "http://10.211.55.5:5555/MSCRMservices/2006/crmservice.asmx?wsdl" and, yes, it was soap connector, finally. But that is where the funniest part starts. Microsoft uses their authentication method called NTLM and, of course, there is no support for in-built soap client. Ok, there was some .. exactly one example in several web sites, what isn't working quite as well as expected.
After some looking around I went over php based library nusoap . Nusoap have NTLM support. "Yes!" - I thought to myself. What's next? I have to find how to communicate with ms soap server. And you know, it is not so easy as it sounds. There are plenty of examples around, but they all are hand made xml, but I have nusoap class, what does it self. I just have to put right values in right places. And that is not so easy either. It started here:
went here:
and ended here:
What should I put in all those method arguments? Searched all over google, no example, nothing, just stupid msdn documentation web site with class reference, what is totally useless, if I don't know how to use it. So that was it. I started to think about other solutions.
One I came up with was, that I could include mscrm in-built web client into iframe and all done, but as always it is not that simple. Firstly because users will have to enter their username and password again, and that is not worse thing. The even worse thing that in-built web client works only and only on microsoft internet explorer. So I asked myself: "What is that? CRM? It should be useful, not painful".
Iframe solution didn't worked out, so I thought I could just make some php wrapper/proxy for that web client so users have just one limitation on browsers. I got it working with curl, but not quite working. I got through html code, what wasn't working either way. That was the moment I stopped doing anything and right after that opened parallels virtual machine.
I searched through all start menu items and didn't find anything that would be useable for mssql database browsing. I went to google, again. Searched for some tool. Google pointed me to microsoft web site. There is a tool named "Microsoft SQL web data administrator". I downloaded it, installed, launched, pressed start button. Internet explorer opened automatically to local address what gave me out and error. "F#!@@£% microsoft..".
I went through all menu items searching for something that would be useable to change some permissions stuff in mssql. Nothing. Aaagh... I opened google for the last time, searched something, got answer that I need some "mssql studio.." thing.
Only thing that came into my mind was - "Ok, that's it. I'm done here."
Now I'm sitting in my chair and thinking: "How microsoft manage to get people to use their really stupid setups? Really, how?"
On ubuntu server edition this all would take me like half an hour job? I mean:
http://www.sugarforge.org/frs/download.php/5087/SugarCE-5.2.0a.zip unzip SugarCE-5.2.0a.zip rm SugarCE-5.2.0a.zip rm -R /var/www/ mv -R ./SugarCE-5.2.0a/ /var/www/ + some little configuration and my crm website is ready to use. What about integration into another site. This looks much better, than msdn .
Comments
comments powered by Disqus