<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question How to test a piece of javascript quickly? in Developer forum</title>
    <link>https://www.servicenow.com/community/developer-forum/how-to-test-a-piece-of-javascript-quickly/m-p/2403946#M937997</link>
    <description>&lt;P&gt;How to test a piece of javascript quickly?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you have to test it in client ui policy or business rule? fix script? which is quick and convenient? for example, to query GlideRecord?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 03 Dec 2022 14:51:58 GMT</pubDate>
    <dc:creator>Lei Wang3</dc:creator>
    <dc:date>2022-12-03T14:51:58Z</dc:date>
    <item>
      <title>How to test a piece of javascript quickly?</title>
      <link>https://www.servicenow.com/community/developer-forum/how-to-test-a-piece-of-javascript-quickly/m-p/2403946#M937997</link>
      <description>&lt;P&gt;How to test a piece of javascript quickly?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you have to test it in client ui policy or business rule? fix script? which is quick and convenient? for example, to query GlideRecord?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 03 Dec 2022 14:51:58 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-to-test-a-piece-of-javascript-quickly/m-p/2403946#M937997</guid>
      <dc:creator>Lei Wang3</dc:creator>
      <dc:date>2022-12-03T14:51:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to test a piece of javascript quickly?</title>
      <link>https://www.servicenow.com/community/developer-forum/how-to-test-a-piece-of-javascript-quickly/m-p/2403948#M937999</link>
      <description>&lt;P&gt;Background script is the quickest and easiest.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;STRONG style="color: black;"&gt;Please mark the answer correct/helpful accordingly.&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 03 Dec 2022 15:02:47 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-to-test-a-piece-of-javascript-quickly/m-p/2403948#M937999</guid>
      <dc:creator>Raghav Sharma24</dc:creator>
      <dc:date>2022-12-03T15:02:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to test a piece of javascript quickly?</title>
      <link>https://www.servicenow.com/community/developer-forum/how-to-test-a-piece-of-javascript-quickly/m-p/2403950#M938000</link>
      <description>&lt;P&gt;For server side - background scripts.&amp;nbsp;&lt;BR /&gt;For client side - JavaScript executor.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 03 Dec 2022 15:20:43 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-to-test-a-piece-of-javascript-quickly/m-p/2403950#M938000</guid>
      <dc:creator>Mike_R</dc:creator>
      <dc:date>2022-12-03T15:20:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to test a piece of javascript quickly?</title>
      <link>https://www.servicenow.com/community/developer-forum/how-to-test-a-piece-of-javascript-quickly/m-p/2403956#M938005</link>
      <description>&lt;P&gt;how to access JS executor from NOW? or where is it?&lt;/P&gt;</description>
      <pubDate>Sat, 03 Dec 2022 16:25:16 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-to-test-a-piece-of-javascript-quickly/m-p/2403956#M938005</guid>
      <dc:creator>Lei Wang3</dc:creator>
      <dc:date>2022-12-03T16:25:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to test a piece of javascript quickly?</title>
      <link>https://www.servicenow.com/community/developer-forum/how-to-test-a-piece-of-javascript-quickly/m-p/2403957#M938006</link>
      <description>&lt;P&gt;On any form or list view,&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;press and hold Alt+Ctrl+Shift+j&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 03 Dec 2022 16:27:06 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-to-test-a-piece-of-javascript-quickly/m-p/2403957#M938006</guid>
      <dc:creator>Mike_R</dc:creator>
      <dc:date>2022-12-03T16:27:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to test a piece of javascript quickly?</title>
      <link>https://www.servicenow.com/community/developer-forum/how-to-test-a-piece-of-javascript-quickly/m-p/2403961#M938008</link>
      <description>&lt;P&gt;that works, thanks!&lt;/P&gt;&lt;P&gt;can I save background script to rerun it again? right now, after running one time, it only gives a history link&lt;/P&gt;</description>
      <pubDate>Sat, 03 Dec 2022 16:37:21 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-to-test-a-piece-of-javascript-quickly/m-p/2403961#M938008</guid>
      <dc:creator>Lei Wang3</dc:creator>
      <dc:date>2022-12-03T16:37:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to test a piece of javascript quickly?</title>
      <link>https://www.servicenow.com/community/developer-forum/how-to-test-a-piece-of-javascript-quickly/m-p/2403962#M938009</link>
      <description>&lt;P&gt;No problem!&lt;/P&gt;&lt;P&gt;If you want to save a server side script to run it on demand, you can create a fix script&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.servicenow.com/bundle/tokyo-application-development/page/build/applications/task/t_CreateFixScripts.html" target="_blank"&gt;https://docs.servicenow.com/bundle/tokyo-application-development/page/build/applications/task/t_CreateFixScripts.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 03 Dec 2022 16:39:23 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-to-test-a-piece-of-javascript-quickly/m-p/2403962#M938009</guid>
      <dc:creator>Mike_R</dc:creator>
      <dc:date>2022-12-03T16:39:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to test a piece of javascript quickly?</title>
      <link>https://www.servicenow.com/community/developer-forum/how-to-test-a-piece-of-javascript-quickly/m-p/2403964#M938010</link>
      <description>&lt;P&gt;from the javascript execute, I tried to run the following code. but looks like nothing happens after clicking run. anything wrong with my code?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LeiWang3_0-1670085702782.png" style="width: 400px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/222562i3469985BC1F85D32/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LeiWang3_0-1670085702782.png" alt="LeiWang3_0-1670085702782.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;var gr = new GlideRecord('incident');&lt;BR /&gt;gr.addQuery('active', true);&lt;BR /&gt;gr.query();&lt;/P&gt;&lt;P&gt;while(gr.next()) {&lt;BR /&gt;alert('Incident count: ' + gr.getRowCount());&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Sat, 03 Dec 2022 16:41:49 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-to-test-a-piece-of-javascript-quickly/m-p/2403964#M938010</guid>
      <dc:creator>Lei Wang3</dc:creator>
      <dc:date>2022-12-03T16:41:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to test a piece of javascript quickly?</title>
      <link>https://www.servicenow.com/community/developer-forum/how-to-test-a-piece-of-javascript-quickly/m-p/2403965#M938011</link>
      <description>&lt;P&gt;If you want to save the script and rerun it, fix script is the best.&lt;/P&gt;
&lt;P&gt;For client side execute script in javascript executor.&lt;/P&gt;</description>
      <pubDate>Sat, 03 Dec 2022 16:45:18 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-to-test-a-piece-of-javascript-quickly/m-p/2403965#M938011</guid>
      <dc:creator>Raghav Sharma24</dc:creator>
      <dc:date>2022-12-03T16:45:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to test a piece of javascript quickly?</title>
      <link>https://www.servicenow.com/community/developer-forum/how-to-test-a-piece-of-javascript-quickly/m-p/2403966#M938012</link>
      <description>&lt;P&gt;This is because you are trying to run server side code in javascript executor, you need to run client code here.&lt;/P&gt;</description>
      <pubDate>Sat, 03 Dec 2022 16:47:18 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-to-test-a-piece-of-javascript-quickly/m-p/2403966#M938012</guid>
      <dc:creator>Raghav Sharma24</dc:creator>
      <dc:date>2022-12-03T16:47:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to test a piece of javascript quickly?</title>
      <link>https://www.servicenow.com/community/developer-forum/how-to-test-a-piece-of-javascript-quickly/m-p/2403967#M938013</link>
      <description>&lt;P&gt;Javascript Executor is only for client-side code, and you shouldn't use GlideRecord in client-side code.&lt;/P&gt;&lt;P&gt;If you are just trying to test the js executor, try this simple line&lt;/P&gt;&lt;P&gt;alert("Hello from the Javascript Executor");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To learn more about scripting, I highly recommend this&lt;/P&gt;&lt;P&gt;&lt;A href="https://developer.servicenow.com/dev.do#!/learn/courses/tokyo/app_store_learnv2_scripting_tokyo_scripting_in_servicenow" target="_blank" rel="noopener"&gt;https://developer.servicenow.com/dev.do#!/learn/courses/tokyo/app_store_learnv2_scripting_tokyo_scripting_in_servicenow&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.youtube.com/watch?v=62Nabpb94Jw" target="_blank" rel="noopener"&gt;https://www.youtube.com/watch?v=62Nabpb94Jw&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 03 Dec 2022 16:47:29 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-to-test-a-piece-of-javascript-quickly/m-p/2403967#M938013</guid>
      <dc:creator>Mike_R</dc:creator>
      <dc:date>2022-12-03T16:47:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to test a piece of javascript quickly?</title>
      <link>https://www.servicenow.com/community/developer-forum/how-to-test-a-piece-of-javascript-quickly/m-p/2403972#M938016</link>
      <description>&lt;P&gt;I may not be able to remember this shortkey. Is there a way to open the executor in menu item?&lt;/P&gt;</description>
      <pubDate>Sat, 03 Dec 2022 18:19:23 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-to-test-a-piece-of-javascript-quickly/m-p/2403972#M938016</guid>
      <dc:creator>Lei Wang3</dc:creator>
      <dc:date>2022-12-03T18:19:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to test a piece of javascript quickly?</title>
      <link>https://www.servicenow.com/community/developer-forum/how-to-test-a-piece-of-javascript-quickly/m-p/2403986#M938024</link>
      <description>&lt;P&gt;Unfortunately no&lt;/P&gt;</description>
      <pubDate>Sat, 03 Dec 2022 19:30:50 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-to-test-a-piece-of-javascript-quickly/m-p/2403986#M938024</guid>
      <dc:creator>Mike_R</dc:creator>
      <dc:date>2022-12-03T19:30:50Z</dc:date>
    </item>
  </channel>
</rss>

