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.js. In 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….