Autopopulate the data from any file(html,xls) using javascript in crm 2011



    Hi all,

    I have one requirement stating that

          1) when a user open new account record,there will be one custom buttom in ribbon called as "SET".

          2) Once the user clicks on SET button the data should automatically filled into account form from any file like excel,html.

           3) here file is store in client user desktop,not in the crm server.
           4)Without based on any account id or any other field , it should filled the data into account form from file.

    so, how to achieve this using javascript.


    Friday, March 23, 2012 1:31 AM

All replies

  • 1. There are examples in the SDK for adding custom buttons to the ribbon and having them execute a javascript function.

    2. You can use standard parsing for a CSV or XML file structure to pull the data you want and then loop through it and update the corresponding attribute on the form based on the column or node name.

    3. This is going to be a problematic. Historically reading a file from the local file system through client side scripts was a big security problem. HTML5 does have some changes that finally opens up the local file system for Javascript see . But HTML5 features like this work in a limited number of browsers and it probably will not work in IE.

    4. I'm not sure how this differs from 2?

    I would make sure that the same functionality could not be met using the native import wizard in CRM to import these account files before going down this route.

    • Proposed as answer by CRM Nerd Monday, May 07, 2012 4:53 PM
    Friday, March 23, 2012 2:12 AM