<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Notes On Siebel &#187; Scripting</title>
	<atom:link href="http://blog.notesonsiebel.com/category/siebel/scripting/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.notesonsiebel.com</link>
	<description>Technical advice, help and instruction with Siebel Systems</description>
	<lastBuildDate>Wed, 13 Aug 2008 23:24:05 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Browser Script &#8220;on the fly&#8221;</title>
		<link>http://blog.notesonsiebel.com/2008/05/20/browser-script-on-the-fly/</link>
		<comments>http://blog.notesonsiebel.com/2008/05/20/browser-script-on-the-fly/#comments</comments>
		<pubDate>Tue, 20 May 2008 06:27:21 +0000</pubDate>
		<dc:creator>stuandgravy</dc:creator>
				<category><![CDATA[Configuration]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Siebel]]></category>

		<guid isPermaLink="false">http://blog.notesonsiebel.com/?p=59</guid>
		<description><![CDATA[Top tip today from Neel over at Siebel Unleashed: using the IE address bar to enter browser script.
I&#8217;ve never thought of this, and the key point is worth repeating: script entered into the address bar after a javascript tag is executed by the browser, in exactly the same way as browser script. This means that [...]]]></description>
			<content:encoded><![CDATA[<p>Top tip today from Neel over at Siebel Unleashed: <a title="Address Bar and Browser Script" href="http://siebelunleashed.com/internet-explorer-address-bar-and-siebel-browser-script/">using the IE address bar to enter browser script</a>.</p>
<p>I&#8217;ve never thought of this, and the key point is worth repeating: script entered into the address bar after a javascript tag is executed by the browser, in exactly the same way as browser script. This means that if you edit the address to be:</p>
<p><code>javascript:alert(theApplication().GetProfileAttr("Me.First Name"));</code></p>
<p>&#8230;then the browser will popup a message box with the value of the First Name attribute &#8211; exactly as you&#8217;d expect if this statement was in browser script. Much faster than navigating to <em>Administration &#8211; Personalization &gt; Test</em>, plus it retains current context.</p>
<p>Nice quick-and-dirty hack to check (or set) the value of browser objects. Good work, Neel!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.notesonsiebel.com/2008/05/20/browser-script-on-the-fly/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Shell command for Browser Script</title>
		<link>http://blog.notesonsiebel.com/2008/05/05/shell-command-for-browser-script/</link>
		<comments>http://blog.notesonsiebel.com/2008/05/05/shell-command-for-browser-script/#comments</comments>
		<pubDate>Mon, 05 May 2008 00:18:00 +0000</pubDate>
		<dc:creator>stuandgravy</dc:creator>
				<category><![CDATA[Integration]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Siebel]]></category>

		<guid isPermaLink="false">http://blog.notesonsiebel.com/?p=58</guid>
		<description><![CDATA[A question on the Oracle discussion forum last week prompted me to dig out a MetaLink article that I&#8217;ve never noted here. The question was &#8220;How to call a local executable from the browser&#8221;: the answer is to use browser script to instantiate a Windows Scripting Host &#8216;Shell&#8217; ActiveX object, like so:
var objWSH = new [...]]]></description>
			<content:encoded><![CDATA[<p>A question on the Oracle discussion forum <a title="Oracle Discussion Form" href="http://forums.oracle.com/forums/thread.jspa?messageID=2499916&amp;tstart=0#2499916" target="_blank">last week</a> prompted me to dig out a MetaLink article that I&#8217;ve never noted here. The question was &#8220;How to call a local executable from the browser&#8221;: the <a title="MetaLink3 Login required" href="https://metalink3.oracle.com/od/faces/secure/km/DocumentDisplay.jspx?id=546014.1&amp;h=Y" target="_blank">answer</a> is to use browser script to instantiate a Windows Scripting Host &#8216;Shell&#8217; ActiveX object, like so:</p>
<p><code>var objWSH = new ActiveXObject("WScript.Shell");</code><br />
<code>objWSH.Run("notepad.exe"); </code></p>
<p>More detail on using the ActiveXObject is available in the post on <a title="Client side DLLS" href="http://blog.notesonsiebel.com/2007/04/17/client-side-dlls/" target="_blank">Client-side DLLS</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.notesonsiebel.com/2008/05/05/shell-command-for-browser-script/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Shared Browser Script variables</title>
		<link>http://blog.notesonsiebel.com/2008/03/27/shared-browser-script-variables/</link>
		<comments>http://blog.notesonsiebel.com/2008/03/27/shared-browser-script-variables/#comments</comments>
		<pubDate>Thu, 27 Mar 2008 01:43:37 +0000</pubDate>
		<dc:creator>stuandgravy</dc:creator>
				<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Siebel]]></category>

		<guid isPermaLink="false">http://blog.notesonsiebel.com/2008/03/27/shared-browser-script-variables/</guid>
		<description><![CDATA[I had a problem the other day where I needed to share a value between two applets. On a form applet there&#8217;s a browser script method that executes on the WriteRecord event, but it&#8217;s designed to only fire if certain other events have already run. To control the &#8217;state&#8217; (execute or not), there&#8217;s a boolean [...]]]></description>
			<content:encoded><![CDATA[<p>I had a problem the other day where I needed to share a value between two applets. On a form applet there&#8217;s a browser script method that executes on the WriteRecord event, but it&#8217;s designed to only fire if certain other events have already run. To control the &#8217;state&#8217; (execute or not), there&#8217;s a boolean variable declared in the general declarations of the browser script. This form is used in a number of different views and works as designed.</p>
<p>The challenge was in the screen&#8217;s List view: here we have the form applet, which works as elsewhere, but also a list applet for the same business component. The behaviour should be the same for both applets. Easy enough, I figured: just copy the form&#8217;s browser script across to the list. And this approach appeared to work well enough.</p>
<p>An alert tester picked up the gap: if the operation was started in the <em>list </em>applet, but then completed in the <em>form </em>applet (or vice-versa), then the browser script wasn&#8217;t executing. In the first applet the state variable was set, but in the second applet not. What I needed was for the state to be shared across the two applets.</p>
<p>The usual way to share variables across objects is to use Profile Attributes or Global Variables, but neither solution was an option. Global variables simply aren&#8217;t available through browser scripts, while the getting and setting of profile attributes requires a round-trip to the server &#8211; too much of an overhead in this case. I thought I was going to have to resort to some sort of hidden control and FindApplet then FindControl methods, but the solution was much simpler.</p>
<p>Turns out that <strong>variables declared in the general declarations section of Browser Script are shared for all the applets in the view</strong>. <a href="https://metalink3.oracle.com/od/faces/secure/km/DocumentDisplay.jspx?id=477659.1&amp;h=Y" title="MetaLink 3 login required" target="_blank">Who knew</a>? (See the note about halfway down.) Okay, quite possibly everyone except me, but now I won&#8217;t forget.</p>
<p>For my little problem, I was able to prescribe that this list applet be only used alongside the form applet, which meant that in the list&#8217;s browser script I could simply set and get state using the form&#8217;s variable. The applets now share state and everything works as expected.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.notesonsiebel.com/2008/03/27/shared-browser-script-variables/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>More on Script Assist</title>
		<link>http://blog.notesonsiebel.com/2007/10/29/more-on-script-assist/</link>
		<comments>http://blog.notesonsiebel.com/2007/10/29/more-on-script-assist/#comments</comments>
		<pubDate>Sun, 28 Oct 2007 23:30:19 +0000</pubDate>
		<dc:creator>stuandgravy</dc:creator>
				<category><![CDATA[Community]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Siebel]]></category>

		<guid isPermaLink="false">http://blog.notesonsiebel.com/2007/10/29/more-on-script-assist/</guid>
		<description><![CDATA[A great update on the Script Assist functionality I mentioned a while back. In a comment on my original post, Jake pointed out a &#8220;*huge* performance impact when the method listing and autocomplete options were enabled on scripted BCs in v8&#8243;.
Now, an anonymous commenter posts that this problem has been recently fixed and &#8220;should be [...]]]></description>
			<content:encoded><![CDATA[<p>A great update on the <a href="http://blog.stuandgravy.com/2007/07/04/enable-script-assist/" title="Enable Script Assist">Script Assist</a> functionality I mentioned a while back. In a comment on my original post, Jake pointed out a &#8220;*huge* performance impact when the method listing and autocomplete options were enabled on scripted BCs in v8&#8243;.</p>
<p>Now, an anonymous commenter posts that this problem has <a href="http://blog.stuandgravy.com/2007/07/04/enable-script-assist/#comment-1599" title="Script Assist fixed">been recently fixed</a> and &#8220;should be available as a QF and in the FixPacks&#8221;. The comment also highlights some of the additional scripting improvements in 8.0 that I hadn&#8217;t come across &#8211; including &#8220;Fix &amp; Go&#8221; debugging, Siebel&#8217;s version of Visual Studio&#8217;s &#8220;Edit &amp; Continue&#8221; &#8211; and signposts an &#8220;upcoming 8.1 feature, Script Performance Profiler&#8221;.</p>
<p>I&#8217;m very (inordinately?) pleased with the additional information. Partly because the improvements are all good, legitimate changes that drag Siebel Tools towards with other fully featured development environments, but moreso because it&#8217;s great to see an <a href="http://ws.arin.net/whois/?queryinput=148.87.1.172" title="Whois Noone?">employee of Oracle</a> monitoring and feeding back directly into the development community. This is exactly the sort of thing I was hoping to see when I started the blog&#8230; may a thousand geeky conversations bloom <img src='http://blog.notesonsiebel.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.notesonsiebel.com/2007/10/29/more-on-script-assist/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Dynamically Show/hide a Control</title>
		<link>http://blog.notesonsiebel.com/2007/07/30/dynamically-showhide-a-control/</link>
		<comments>http://blog.notesonsiebel.com/2007/07/30/dynamically-showhide-a-control/#comments</comments>
		<pubDate>Mon, 30 Jul 2007 02:51:29 +0000</pubDate>
		<dc:creator>stuandgravy</dc:creator>
				<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Siebel]]></category>

		<guid isPermaLink="false">http://blog.notesonsiebel.com/2007/07/30/dynamically-showhide-a-control/</guid>
		<description><![CDATA[The browser script Control method &#8216;SetProperty&#8217; is fairly limited: it only works at all with CheckBox, ComboBox, TextBox and TextAreas, and even with these controls I&#8217;ve found behaviour to be flaky. In my experience it&#8217;s more reliable to grab a handle to the control and access the DOM properties directly.
For instance, to conditionally show or [...]]]></description>
			<content:encoded><![CDATA[<p>The browser script Control method &#8216;SetProperty&#8217; is fairly limited: it only works at all with CheckBox, ComboBox, TextBox and TextAreas, and even with these controls I&#8217;ve found behaviour to be flaky. In my experience it&#8217;s more reliable to grab a handle to the control and access the DOM properties directly.</p>
<p>For instance, to conditionally show or hide a control using browser script, the code looks like this:<br />
<code> </code></p>
<pre>var ctrl = thisApplet.FindActiveXControl("My Control");

if( ctrl != null )

{

  if( myFlag )

    ctrl.style.visibility="visible";// show control

  else

     ctrl.style.visibility="hidden";// hide control

}</pre>
<p>This approach can also be used to set other display properties &#8211; like the font and colors &#8211; but you have to be a bit more careful with interactive properties: the standard HTML property <em>disabled</em> does not work the same as Siebel&#8217;s <em>Enabled</em> control property, for instance.</p>
<p>The best reference I&#8217;ve found to <a href="http://msdn2.microsoft.com/en-us/library/ms533050.aspx" title="HTML and DHTML reference">the complete set of DOM properties</a> is on MSDN, with the advantage that everything here <em>should</em> be available to Siebel&#8217;s IE-only environment.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.notesonsiebel.com/2007/07/30/dynamically-showhide-a-control/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Order of Events</title>
		<link>http://blog.notesonsiebel.com/2007/07/19/order-of-events/</link>
		<comments>http://blog.notesonsiebel.com/2007/07/19/order-of-events/#comments</comments>
		<pubDate>Thu, 19 Jul 2007 00:04:17 +0000</pubDate>
		<dc:creator>stuandgravy</dc:creator>
				<category><![CDATA[Configuration]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Siebel]]></category>
		<category><![CDATA[Workflow]]></category>

		<guid isPermaLink="false">http://blog.notesonsiebel.com/2007/07/19/order-of-events/</guid>
		<description><![CDATA[A quick list, for reference:

Runtime Applet.PreInvokeMethod
Browser Applet_PreInvokeMethod
Server WebApplet_PreInvokeMethod
Runtime BusComp.PreInvokeMethod
Server BusComp_PreInvokeMethod
Runtime BusComp.InvokeMethod
Server BusComp_InvokeMethod
Runtime Applet.InvokeMethod
Server WebApplet_InvokeMethod
Browser Applet_InvokeMethod

Essentially, the Runtime Event occurs before the equivalent server script event for the same object, plus the Applet browser script events &#8216;wrap&#8217; all server side events.All of which makes perfect logical sense, but it&#8217;s sometimes handy to see it written down [...]]]></description>
			<content:encoded><![CDATA[<p>A quick list, for reference:</p>
<ul>
<li><em>Runtime</em> Applet.PreInvokeMethod</li>
<li><em>Browser</em> Applet_PreInvokeMethod</li>
<li><em>Server</em> WebApplet_PreInvokeMethod</li>
<li><em>Runtime</em> BusComp.PreInvokeMethod</li>
<li><em>Server </em>BusComp_PreInvokeMethod</li>
<li><em>Runtime </em>BusComp.InvokeMethod</li>
<li><em>Server </em>BusComp_InvokeMethod</li>
<li><em>Runtime </em>Applet.InvokeMethod</li>
<li><em>Server </em>WebApplet_InvokeMethod</li>
<li><em>Browser </em>Applet_InvokeMethod</li>
</ul>
<p>Essentially, the Runtime Event occurs before the equivalent server script event for the same object, plus the Applet browser script events &#8216;wrap&#8217; all server side events.All of which makes perfect logical sense, but it&#8217;s sometimes handy to see it written down in a list.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.notesonsiebel.com/2007/07/19/order-of-events/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Enable Script Assist</title>
		<link>http://blog.notesonsiebel.com/2007/07/04/enable-script-assist/</link>
		<comments>http://blog.notesonsiebel.com/2007/07/04/enable-script-assist/#comments</comments>
		<pubDate>Tue, 03 Jul 2007 22:32:06 +0000</pubDate>
		<dc:creator>stuandgravy</dc:creator>
				<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Siebel]]></category>

		<guid isPermaLink="false">http://blog.notesonsiebel.com/2007/07/04/enable-script-assist/</guid>
		<description><![CDATA[Siebel 7.7.2.3 and 7.8.2 introduced a new eScript engine called the ST eScript engine. The engine supports strong typing, which offers performance improvements at the cost of offending some weak-typing-fundamentalists. Even without rewriting script to define your variables, the new engine is supposed to offer performance and scalability advantages over the old T-eScript engine.
More importantly [...]]]></description>
			<content:encoded><![CDATA[<p>Siebel 7.7.2.3 and 7.8.2 introduced a new eScript engine called the ST eScript engine. The engine supports strong typing, which offers performance improvements at the cost of offending some weak-typing-fundamentalists. Even without rewriting script to define your variables, the new engine is supposed to offer performance and scalability advantages over the old T-eScript engine.</p>
<p>More importantly for the day-to-day life of a hard-coding Siebel developer, the new engine (finally!) offers method listing (known elsewhere as &#8216;typedown&#8217;). This is the feature common to all modern IDEs that pops up a list of child methods of a known-type object, so that the poor developer doesn&#8217;t have to remember the precise format of &#8216;PropertySet.InsertChildAt&#8217;. One of those little modern innovations that lets developers get on with concentrating on the flow of their script, rather than the irrelevancies of syntax. Now, Siebel&#8217;s implementation is hardly Visual Studio IntelliSense, but it&#8217;s useful nonetheless.</p>
<p>To switch on method listing, go to <u>V</u>iew &gt; <u>O</u>ptions in Tools, then the Scripting tab, and tick the &#8216;Enable <u>M</u>ethod Listing&#8217; checkbox: the associated IDE-improvements &#8216;Enable Auto <u>C</u>omplete&#8217;, &#8216;Enable Warnings&#8217; and &#8216;Deduce Types&#8217; are also worth having. If you can set all these flags then you&#8217;re good to go.</p>
<p>If these settings are all disabled, then you&#8217;re not using ST eScript engine. This is an enterprise-wide setting that you might have to sell. Details of the whys and hows are on <a href="https://metalink3.oracle.com/od/faces/secure/km/DocumentDisplay.jspx?id=478161.1&amp;h=Y" target="_blank" title="MetaLink login required">SupportWeb</a>. In brief: for 7.8 &amp; 8, set the System Preference &#8216;Enable ST Script Engine&#8217; to TRUE, for 7.7.2.4, change your cfg file to set EnableCLIScripting to TRUE.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.notesonsiebel.com/2007/07/04/enable-script-assist/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Navigating through the history thread</title>
		<link>http://blog.notesonsiebel.com/2007/06/26/navigating-through-the-history-thread/</link>
		<comments>http://blog.notesonsiebel.com/2007/06/26/navigating-through-the-history-thread/#comments</comments>
		<pubDate>Tue, 26 Jun 2007 08:21:49 +0000</pubDate>
		<dc:creator>stuandgravy</dc:creator>
				<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Siebel]]></category>

		<guid isPermaLink="false">http://blog.notesonsiebel.com/2007/06/26/navigating-through-the-history-thread/</guid>
		<description><![CDATA[Quick question: how do you go about navigating &#8216;back&#8217; or &#8216;forward&#8217; in a Siebel 7 application?
Quick  answer: use the JavaScript history object.
In Siebel 6 there was the &#8216;GoBack&#8217; method, but that never made the journey across the thin client chasm. I&#8217;ve come across a couple of different methods for Siebel 7, but the history [...]]]></description>
			<content:encoded><![CDATA[<p>Quick question: how do you go about navigating &#8216;back&#8217; or &#8216;forward&#8217; in a Siebel 7 application?</p>
<p>Quick  answer: use the JavaScript <code>history</code> object.</p>
<p>In Siebel 6 there was the &#8216;GoBack&#8217; method, but that never made the journey across the thin client chasm. I&#8217;ve come across a couple of different methods for Siebel 7, but the history object is by far the most robust and reliable. It&#8217;s browser script only, because you&#8217;re accessing the native JavaScript object, but that drawback is far outweighed by its simplicity.</p>
<p>To navigate back one step in the history, the code might be:</p>
<blockquote><p>function Applet_PreInvokeMethod (name, inputPropSet)<br />
{</p>
<blockquote><p> if( &#8220;GoBack&#8221; == name )<br />
{</p>
<blockquote><p> history.go(-1);<br />
return (&#8221;CancelOperation&#8221;);</p></blockquote>
<p>}<br />
return (&#8221;ContinueOperation&#8221;);</p></blockquote>
<p>}</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://blog.notesonsiebel.com/2007/06/26/navigating-through-the-history-thread/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Client-side DLLs</title>
		<link>http://blog.notesonsiebel.com/2007/04/17/client-side-dlls/</link>
		<comments>http://blog.notesonsiebel.com/2007/04/17/client-side-dlls/#comments</comments>
		<pubDate>Mon, 16 Apr 2007 23:02:20 +0000</pubDate>
		<dc:creator>stuandgravy</dc:creator>
				<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Siebel]]></category>

		<guid isPermaLink="false">http://blog.notesonsiebel.com/2007/04/17/client-side-dlls/</guid>
		<description><![CDATA[The Siebel 7 thin-client is marvellous for many reasons, but sometimes it&#8217;s necessary to integrate with an old-fashioned, locally installed thick-client application. In Server Script it&#8217;s possible to access any DLL by using the eScript SElib.dynamicLink() function, but browser script doesn&#8217;t give us the same flexibility.
What we have in the browser is JScript&#8217;s ActiveXObject function, [...]]]></description>
			<content:encoded><![CDATA[<p>The Siebel 7 thin-client is marvellous for many reasons, but sometimes it&#8217;s necessary to integrate with an old-fashioned, locally installed thick-client application. In Server Script it&#8217;s possible to access any DLL by using the eScript <code>SElib.dynamicLink()</code> function, but browser script <a href="https://metalink3.oracle.com/od/faces/secure/km/DocumentDisplay.jspx?id=476728.1&amp;h=Y" target="_blank" title="MetaLink login required">doesn&#8217;t give us</a> the same flexibility.</p>
<p>What we have in the browser is JScript&#8217;s <code>ActiveXObject</code> function, which creates an instance of an ActiveX component. For instance, to get the installed version of Microsoft Word, we do:</p>
<p><code>var wdApp = new ActiveXObject("Word.Application");</code><br />
<code>alert(wdApp.Version);</code></p>
<p>No problemo. (Although note that for the function to work, the ActiveX component must be successfully <a href="http://consumer.installshield.com/kb.asp?id=Q108199" title="Register a DLL">registered</a>).</p>
<p>The big limitation of this function is in the name: it will only talk to OLE Automation (i.e. ActiveX/COM) components. If your client-side object is an old C library then you&#8217;ll have no luck. There is a solution, however: open up any installation of Visual Studio (or similar) and whip up a COM wrapper for your old school object. Performance will take a hit, but it saves rewriting applications from scratch.</p>
<p>Siebel&#8217;s explanation of ActiveXObject is buried in the upgrade guide &#8211; and is missing from some versions of Bookshelf. <a href="http://download.oracle.com/docs/cd/B31104_02/books/UpgradeDB2390/UpgradeDB2390_PostMrg_Mig_6x13.html#wp1005511" target="_blank" title="Siebel Bookshelf 7.8 Upgrade Guide">Find it here</a>. They&#8217;ve also got a good technote on <a href="https://metalink3.oracle.com/od/faces/secure/km/DocumentDisplay.jspx?id=476501.1&amp;h=Y" target="_blank" title="MeteLink login required">creating a COM wrapper</a>, but note that they&#8217;re linking the DLL from eScript using <code>COMCreateObject</code>: for browser script use <code>ActiveXObject</code> as above.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.notesonsiebel.com/2007/04/17/client-side-dlls/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Popping up the Persistent Customer Dashboard</title>
		<link>http://blog.notesonsiebel.com/2007/03/02/popping-up-the-persistent-customer-dashboard/</link>
		<comments>http://blog.notesonsiebel.com/2007/03/02/popping-up-the-persistent-customer-dashboard/#comments</comments>
		<pubDate>Fri, 02 Mar 2007 09:32:31 +0000</pubDate>
		<dc:creator>stuandgravy</dc:creator>
				<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Siebel]]></category>

		<guid isPermaLink="false">http://blog.notesonsiebel.com/2007/03/02/popping-up-the-persistent-customer-dashboard/</guid>
		<description><![CDATA[A while ago I was implementing the Persistent Customer Dashboard in Siebel 7.8. Generally, the dashboard is linked into CTI and auto-populates customer details when successfully matching an incoming phone number, after which all the customer info remains visible to the user no matter where else they navigate in the application. Some variation of the [...]]]></description>
			<content:encoded><![CDATA[<p>A while ago I was implementing the Persistent Customer Dashboard in Siebel 7.8. Generally, the dashboard is linked into CTI and auto-populates customer details when successfully matching an incoming phone number, after which all the customer info remains visible to the user no matter where else they navigate in the application. Some variation of the functionality is standard in most call centres.This particular client wanted to use the functionality in a more manual scenario though, with the users querying for the customer before manually populating the dashboard. That&#8217;s pretty easy to do, invoking the &#8216;Update Dashboard&#8217; method on the Persistent Customer Dashboard business service.</p>
<p>The first complication was that the client didn&#8217;t want the dashboard visible by default &#8211; I needed to have it open up and populate on demand. That turned out to be also not too tricky: there&#8217;s an &#8216;OpenDashboard&#8217; method on the same Persistent Customer Dashboard business service that does exactly what is says on the tin. [Note: 'OpenDashboard' (no space) and 'Update Dashboard' (with space). Intuitive, non?]</p>
<p>The tricky thing was that we needed to open the dashboard, update the dashboard details <em>and</em> update the source applet &#8211; all from a single button click. Problem: the dashboard and the source applet are in different frames, and <strong>only one frame can be updated from one UI event</strong>. So if I updated the Dashboard, the update to the source applet didn&#8217;t happen. And if I updated the source applet&#8230;</p>
<p>The solution was to create a second button on the applet to trigger dashboard update in a server script. Add in a browser script to handle the method for the first button, opening up the dashboard from there &#8211; and allowing the source applet updates to happen &#8211; before using FindActiveXControl to programmatically &#8216;click&#8217; the second button &#8211; giving us a second UI event and the opportunity to populate the dashboard.</p>
<p>Code below&#8230;</p>
<p><em>Server script </em><em>&#8216;Update Dashboard&#8217; </em></p>
<p><code>// Populate the persistent customer dashboard<br />
var bsDashboard;<br />
var psInputs;<br />
var psOutputs;<br />
var AccountId;</code></p>
<p><code>bsDashboard = TheApplication().GetService("Persistent Customer Dashboard");</code></p>
<p><code>psInputs = TheApplication().NewPropertySet();<br />
psOutputs = TheApplication().NewPropertySet();</code></p>
<p><code>AccountId = this.BusComp().GetFieldValue("Account Id");</code></p>
<p><code>if( AccountId != "" )<br />
{<br />
psInputs.SetProperty("Source Name","Base View");<br />
psInputs.SetProperty("Buscomp Name", "Account");<br />
psInputs.SetProperty("RowId", AccountId);<br />
bsDashboard.InvokeMethod("Update Dashboard", psInputs, psOutputs);<br />
}</code></p>
<p><em>Browser script</em> <em>&#8216;Select Customer&#8217; </em></p>
<p><code>// Open up the Persistent Customer Dashboard<br />
var svc = theApplication().GetService('Persistent Customer Dashboard');<br />
var inputs = theApplication().NewPropertySet();<br />
var outputs =theApplication().NewPropertySet();<br />
outputs = svc.InvokeMethod('OpenDashboard', inputs);</code></p>
<p><code>// Click the custom 'To Dashboard' button<br />
var obj = this.FindActiveXControl("UpdateDashboard");<br />
// obj.all[0].all[0] locates the Anchor tag.<br />
obj.all[0].all[0].click();</code></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.notesonsiebel.com/2007/03/02/popping-up-the-persistent-customer-dashboard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
