Monthly Archives: February 2014

Saving File With Java Script From Dynamic CRM Form

Recently I received new requirements for Dynamics CRM customization. One of them is to make way for user to click on a button on a form, and save a file which is being filled from the fields of entity that button has been placed on.

So the first thing that came into my mind, was using Java Script to save the file. I embedded a html web resource in the entity form, and inside the html web resource I referenced jquery and a library for saving file with js called FileSaver.jsIn the body of that html file, I only put a button and made a click event listener with jquery for it. When the button clicked, Unique Id of entity is read and saved in a varaible, then the content of file we wanted to save is filled and finally saved by calling filesaver.js API.

The file is in EKs format, the one which is used by abas ERP for running some commands (I dont know much about abas ERP).

The solution works fine with Chrome and Firefox, but …. You know IE …. yeah the problem is there. As far as I researched, the problem cant be solved by using activex with js, but I could not get it to work.

I hope I would find a solution and tell you about it….

IE Kills Web developer

I know that most of the applications I develop are in .NET and my OS is Windows 7, and I love Visual Studio, but I hate IE !

In the project we are currently working, we have encountered lots of issues in UI aspect of web application in IE. From simple sliders to responsive tabs and etc… You may say that in newer versions of IE there has been lots of enhancements, but the fact is that most of IE users have not upgraded to recent versions.

The lacks and weakness of this browser has caused to lost market share of browsers to 14 %, whereas it was the first one three years ago.

Anyway the business owner claims that most of his application visitors use IE as their browser! and our team have to make the app accessible  in all browsers .

New Dynamic CRM Customization project

My desk at work with a lovely monitor! (it is verrry wide)

My desk at work with a lovely monitor! (it is verrry wid)

About 10 months ago I was offered to customize MS Dynamic CRM for an educational institute. I had not any experience with any CRM software and even did not know what is all about. The employer offered me this project because I had skills (and still have) in .NET and as you may know, Dynamic CRM is developed in .NET.

I started searching and studying. Those days there were not such resources (now it is better) and there were only two or three books and some blogs and plus Microsoft community (MSDN). Blogs arr better than two others, although people at MSDN are very helpful, but I think it is not enough…

In that project I created a plugin to send SMS to customers, created a application to sync CRM with their web application (developed in php) and …. this project finished about 7 months ago.

After 9 months, I was offered a new CRM customization porject, in a company which sells Server and Network equipment  and hardware. The deadline was so short and there were a lot of new things I had to learn. Main focus on this project was on creating a web service to be called by abas ERP software to send data to CRM, to be short I mean syncing. But aside from web service, there were some requirements that in first glance seemed easy. Actually they were not. I thought I could solve them without developing, but it appeared that for single a workflow I should write custom code!

The businesses owner wanted a funnel chart to show opportunities in three different stages. First problem was make the head developer understand how funnel chart works! (I did not know either at first) and second was implementing their custom stages of opportunities process.

For funnel chart to work, you should have field which shows stages, like “First”, “Second” and … As I read in examples, I had to initialize a filed called Phase Line to make it work with funnel chart. But our stages was not as easy as setting the field with “Save” or “Update” events of opportunity. They want to show opportunities with at least one won quote !!!!

So what did I do ?

I developed a custom  workflow on quote deletion event to check it if causes new stages for opportunity and  also developed a plugin for Win event of opportunity. This events update a custom option set field that is used in funnel char.

What am I gonna post here ?

I am a software developer, and mainly I would post about my experience with software developing, but that would not be all, I would also post about life events, my thought ….

I was  blogging in wordpress in other blog which I created when I entered university, but it has been a year that I dont update it any more. This blog in persian and contains lots of post about all most anything in IT world and was managed by me and my classmates at university.