<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Servicenow Tutorial - Medium]]></title>
        <description><![CDATA[Servicenow tips and tutorial - Medium]]></description>
        <link>https://medium.com/servicenow-malaysia?source=rss----c1b20503ca61---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Servicenow Tutorial - Medium</title>
            <link>https://medium.com/servicenow-malaysia?source=rss----c1b20503ca61---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 00:19:22 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/servicenow-malaysia" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[ServiceNow Web Service : REST API and Javascript]]></title>
            <link>https://medium.com/servicenow-malaysia/servicenow-web-service-rest-api-and-javascript-e1c5d7546cfd?source=rss----c1b20503ca61---4</link>
            <guid isPermaLink="false">https://medium.com/p/e1c5d7546cfd</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[itsm]]></category>
            <category><![CDATA[itil]]></category>
            <category><![CDATA[servicenow]]></category>
            <dc:creator><![CDATA[Iqbal Mohd]]></dc:creator>
            <pubDate>Sun, 27 May 2018 04:50:17 GMT</pubDate>
            <atom:updated>2018-05-26T11:18:06.914Z</atom:updated>
            <content:encoded><![CDATA[<h4>Creating a RESTful web service in ServiceNow platform by using Javascript</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VqJpXbDXU_7y0zoHqsigpQ.jpeg" /></figure><h4>Tools Used in this Tutorial</h4><p>1. ServiceNow Instance<br>2. Javascript</p><h4>Step 1: Creating a Business Rule</h4><p>This tutorial assumes that you already have an accessible instance of ServiceNow that you can connect to. For more information on getting started with ServiceNow, visit their <a href="https://developer.servicenow.com/app.do">online tutorial.</a></p><p>Business Rule : MediumRESTAPI</p><pre>Table      :Incident<br>When to run: Short Description contains Medium.com</pre><pre>Script<br>------</pre><pre>var generateOutbound = new MediumRestAPIInterface(); generateOutbound.addRestInfo(&#39;post&#39;, current.sys_id);<br></pre><h4>Step 2: Creating a Script Include</h4><p>In Script Include, we create to separate script include. The first one to communicate with the business rule and the second one to generate JSON.</p><p>Script Include : MediumRestAPIInterface</p><pre>initialize: function() {<br>  this.baseurl = &quot;Http://medium.com&quot;;<br>  this.jsonConverter = new MediumJSONConverter();<br>},</pre><pre>addRestInfo: function(method, incidentNumber){<br>   info = this.jsonConverter.incidentToJSON(incidentNumber);  <br>   this.endPointREST(&#39;MediumREST&#39;, info, incidentNumber, method);<br> },</pre><pre>endPointREST: function(RESTEndpoint, info, sysId, methodRest){<br>  var r = new RESTMessage(RESTEndpoint, methodRest);<br>  r.setStringParameter(&#39;baseurl&#39;, this.baseurl); <br>  r.setStringParameter(&#39;incident&#39;, sysId);<br>  r.setXMLParameter(&#39;events&#39;, info);<br>  var response = r.execute();</pre><pre>},</pre><p>Script Include : MediumJSONConverter</p><pre>incidentToJSON: function(incidentNumber) {<br>  if (JSUtil.nil(incidentNumber)) return;</pre><pre>  var gr = new GlideRecord(&quot;incident&quot;);   <br>  gr.addQuery(&#39;number&#39;, incidentNumber);<br>  gr.query();<br>  if (gr.next()) {    <br>   return this.incidentGRToJSON(gr);<br>  }<br>  return null;<br> },<br> <br>   <br> incidentGRToJSON: function(pGR) {<br>  var gr = pGR;  <br>  var lObj  = new Object(); <br>  <br>  lObj.title = gr.short_description.getDisplayValue();<br>  lObj.number = gr.number.getDisplayValue();<br>  lObj.shortDescription = gr.short_description.getDisplayValue();<br>  return new JSON().encode(lObj);   <br> },</pre><h4>Step 3: Creating a REST Message</h4><p>Navigate to System Web Services&gt;Rest Message</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z1j8ZNM64xOqvmdr4NJn-g.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e1c5d7546cfd" width="1" height="1" alt=""><hr><p><a href="https://medium.com/servicenow-malaysia/servicenow-web-service-rest-api-and-javascript-e1c5d7546cfd">ServiceNow Web Service : REST API and Javascript</a> was originally published in <a href="https://medium.com/servicenow-malaysia">Servicenow Tutorial</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ServiceNow : Workflow Development]]></title>
            <link>https://medium.com/servicenow-malaysia/servicenow-workflow-development-a7608d6746ad?source=rss----c1b20503ca61---4</link>
            <guid isPermaLink="false">https://medium.com/p/a7608d6746ad</guid>
            <category><![CDATA[servicenow]]></category>
            <category><![CDATA[itsm]]></category>
            <category><![CDATA[itil]]></category>
            <category><![CDATA[workflow]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Iqbal Mohd]]></dc:creator>
            <pubDate>Sun, 27 May 2018 04:50:04 GMT</pubDate>
            <atom:updated>2018-05-26T11:11:26.318Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Wait for WF Event, </strong>fired your workflow from everywhere.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VqJpXbDXU_7y0zoHqsigpQ.jpeg" /></figure><p>The <strong>Wait for WF Event</strong> activity causes the workflow to wait at this activity until the specified event is fired.</p><p>Use this activity to wait for another activity to fire an event. Events from other activities are fired in a script using the workflow.fireEvent(‘eventName’) API call.</p><p><strong>Wait for WF Event vs Run Script</strong></p><p>Run script only limited for certain time only and if the workflow doesn&#39;t reach that point, its never execute the script . But Wait for WF Event run when condition is true.</p><p><strong>How to use it?</strong></p><p>For example, create business rule to fired event.</p><pre>function doIt(){<br>  var gr = new GlideRecord(&#39;change_request&#39;);<br>  gr.get(current.number);<br>  var wf = new Workflow().getRunningFlows(gr);<br>  while(wf.next()) {<br>  new Workflow().broadcastEvent(wf.sys_id, &#39;medium.notifyWorkflow&#39;);<br> }<br>}</pre><p>And simply add Wait for WF Event activity in workflow.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/575/1*wfgD_LGslWhrerjwsPyxyA.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a7608d6746ad" width="1" height="1" alt=""><hr><p><a href="https://medium.com/servicenow-malaysia/servicenow-workflow-development-a7608d6746ad">ServiceNow : Workflow Development</a> was originally published in <a href="https://medium.com/servicenow-malaysia">Servicenow Tutorial</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ServiceNow : g_scratchpad vs GlideAjax]]></title>
            <link>https://medium.com/servicenow-malaysia/servicenow-g-scratchpad-vs-glideajax-1a51b2550b15?source=rss----c1b20503ca61---4</link>
            <guid isPermaLink="false">https://medium.com/p/1a51b2550b15</guid>
            <category><![CDATA[services]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[scratchpad]]></category>
            <category><![CDATA[itil]]></category>
            <category><![CDATA[itsm]]></category>
            <dc:creator><![CDATA[Iqbal Mohd]]></dc:creator>
            <pubDate>Sun, 27 May 2018 04:49:44 GMT</pubDate>
            <atom:updated>2018-05-26T14:47:51.012Z</atom:updated>
            <content:encoded><![CDATA[<p>Manipulation between server side and client side scripting. User experience, speed and practicality.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9BPHMPPMJv6tmrU3ZpiRHg.jpeg" /></figure><p>So what is it? Well essentially it is a way to pass data from the server to the client without using GlideAjax. The data that you pass through is delivered as part of the rendered page. This is a form of server rendering technology. The data is being shared between the server and the client.</p><p>It’s extremely useful for delivering data that there’s a high chance you’ll need (or definitely need) but isn’t there by default. For example, you might want to know the user’s manager, their location, the number of tickets assigned to them etc.</p><p>The other way of retrieving this data would be after the form is loaded to perform a GlideAjax back to the server asking for those details making the user wait for them before seeing the results and letting them move on with the process — I’ve seen this too many times and it’s not a nice experience.</p><p><strong>How to use it?</strong></p><p>For example, create business rule;onDisplay to trigger the condition and fired g_scratchpad function.</p><pre>if(current.short_description = &#39;Medium.com&#39;){<br>   g_scratchpad.isTrue = &#39;true&#39;;<br>}</pre><p>And after that create a client script;onLoad to perform an action</p><pre>if(g_scratchpad.isTrue = &#39;true&#39;){<br>   g_form.setReadOnly(&#39;description&#39;,true); //set field read only  <br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Zw6H9TSrkcbS9SHqPtm-ZA.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1a51b2550b15" width="1" height="1" alt=""><hr><p><a href="https://medium.com/servicenow-malaysia/servicenow-g-scratchpad-vs-glideajax-1a51b2550b15">ServiceNow : g_scratchpad vs GlideAjax</a> was originally published in <a href="https://medium.com/servicenow-malaysia">Servicenow Tutorial</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>