Resources for IT Professionals > Dynamics Forums > CRM Development > Testing JavaScript in Runtime --> Write the syntax in a description field.
Ask a questionAsk a question
 

Proposed AnswerTesting JavaScript in Runtime --> Write the syntax in a description field.

  • Wednesday, November 04, 2009 10:05 PMGjøran Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi

    I year ago i found a handy javascript code tester, that helped you to test your javascript. But I have lost it.

    A new entity was created, with some default attributes attached to the form.
    At the bottom, there was a description field where your wrote the javascript syntax.

    When pressing save, the javascript code from the description field was executed in the onload event.

    Does anyone have an example on how to do that?
    I thought this was a very esay way to test the scripts.

All Replies

  • Thursday, November 05, 2009 12:25 PMMSCRM Blogger Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Proposed AnswerHas Code

    You can use eval to do this.

    Just get the contents of your text box and eval it on save.

     

    var scrpt = crmForm.all.new_scripttestbox.DataValue;
    eval(scrpt); 
    

    --MSCRM Blogger

     

    • Proposed As Answer byMSCRM Blogger Thursday, November 05, 2009 12:26 PM
    •