locked
CRM 2011 JavaScript question can you make it run without opening the form RRS feed

  • Question

  • We have a piece of JavaScript that returns the 65th birthday for an employee.  We want to run this for all employees without having to open each and every employee (which is not feasible).  Is there a way to make the Javascript run so that it will populate that field without opening each record?


    Kristen Hughes

    Monday, September 22, 2014 10:06 PM

Answers

  • The easiest way would be using Data Import. you can extract the employees with the field you want to update, populate that with the 65th birthday using and excel formula and import it back as an update:

    http://www.powerobjects.com/blog/2013/08/01/updating-records-in-microsoft-dynamics-crm/

    you could also write a console application with the crm sdk but that would be a lot more complicated


    I Hope I could help. If I have answered please mark as 'Answer'. If was just helpful, please vote. Thanks and happy coding! Bruno Lucas, http://dynamicday.wordpress.com/

    • Proposed as answer by Guido PreiteMVP Tuesday, September 23, 2014 3:50 AM
    • Marked as answer by Kristen Hughes Tuesday, September 23, 2014 1:14 PM
    Tuesday, September 23, 2014 3:36 AM

All replies

  • hi Kristen,

    you have to use a report to do this. JavaScript is client side code that runs in browser.

    you could also do an advanced find to get this data dump in excel and calculate the dates using a function.

    regards

    Jithesh

    se
    Monday, September 22, 2014 10:22 PM
  • The easiest way would be using Data Import. you can extract the employees with the field you want to update, populate that with the 65th birthday using and excel formula and import it back as an update:

    http://www.powerobjects.com/blog/2013/08/01/updating-records-in-microsoft-dynamics-crm/

    you could also write a console application with the crm sdk but that would be a lot more complicated


    I Hope I could help. If I have answered please mark as 'Answer'. If was just helpful, please vote. Thanks and happy coding! Bruno Lucas, http://dynamicday.wordpress.com/

    • Proposed as answer by Guido PreiteMVP Tuesday, September 23, 2014 3:50 AM
    • Marked as answer by Kristen Hughes Tuesday, September 23, 2014 1:14 PM
    Tuesday, September 23, 2014 3:36 AM
  • HI,

    You can't use java script for your scenario. Either use plugin or workflow to achieve it.


    Hope this helps. ----------------------------------------------------------------------- Santosh Bhagat If this post answers your question, please click "Mark As Answer" on the post and "Vote as Helpful"

    Tuesday, September 23, 2014 8:33 AM