<?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>Siebel Consultant &#187; eScript</title>
	<atom:link href="http://siebelconsultant.net/category/escript/feed/" rel="self" type="application/rss+xml" />
	<link>http://siebelconsultant.net</link>
	<description>Diary of a Siebel Consultant</description>
	<lastBuildDate>Wed, 27 Jan 2010 07:59:20 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Release/Unrelease SmartScripts in batch</title>
		<link>http://siebelconsultant.net/releaseunrelease-smartscripts-in-batch/</link>
		<comments>http://siebelconsultant.net/releaseunrelease-smartscripts-in-batch/#comments</comments>
		<pubDate>Tue, 09 Jun 2009 06:14:41 +0000</pubDate>
		<dc:creator>Wim</dc:creator>
				<category><![CDATA[eScript]]></category>
		<category><![CDATA[SmartScripts]]></category>

		<guid isPermaLink="false">http://siebelconsultant.net/?p=82</guid>
		<description><![CDATA[In the most recent release on the project I&#8217;m currently working on, the customer wanted to work with SmartScripts. Very soon we had over 40 SmartScripts.
The problem with SmartScripts however is that they all need to be released whenever they are created. And since the customer is working with 3 different languages, this means a [...]]]></description>
			<content:encoded><![CDATA[<p>In the most recent release on the project I&#8217;m currently working on, the customer wanted to work with SmartScripts. Very soon we had over 40 SmartScripts.</p>
<p>The problem with SmartScripts however is that they all need to be released whenever they are created. And since the customer is working with 3 different languages, this means a lot of manual labour.</p>
<p>Therefore, I&#8217;ve come up with a simple but clever solution. I&#8217;ve added to extra buttons on the top applet called <em>Unrelease All</em> and <em>Release All</em>.</p>
<p><img class="alignnone" title="SmartScripts Release All" src="http://www.wimblog.be/media/images/smartscripts-releaseall.jpg" alt="" width="519" height="119" /></p>
<p>To (un)release all SmartScripts at once, the user simply has to query in the bottom applet for the correct language and click on the Unrelease All or Release all button. The script behind the buttons then performs the action for all SmartScripts for the specified language.</p>
<p>In the customer&#8217;s case, you have to perform this action 3 times (for languages ENU, NLD and FRA) in stead of around 100 times for each SmartScript individually.</p>


<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand">
<ul class="socials">
		<li class="sexy-delicious">
			<a href="http://del.icio.us/post?url=http://siebelconsultant.net/releaseunrelease-smartscripts-in-batch/&amp;title=Release%2FUnrelease+SmartScripts+in+batch" rel="nofollow" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://siebelconsultant.net/releaseunrelease-smartscripts-in-batch/&amp;title=Release%2FUnrelease+SmartScripts+in+batch" rel="nofollow" title="Digg this!">Digg this!</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://siebelconsultant.net/releaseunrelease-smartscripts-in-batch/&amp;t=Release%2FUnrelease+SmartScripts+in+batch" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=Release%2FUnrelease+SmartScripts+in+batch+-+http://tinyurl.com/np9gj6+" rel="nofollow" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-comfeed">
			<a href="http://siebelconsultant.net/releaseunrelease-smartscripts-in-batch/feed" rel="nofollow" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="sexy-google">
			<a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://siebelconsultant.net/releaseunrelease-smartscripts-in-batch/&amp;title=Release%2FUnrelease+SmartScripts+in+batch" rel="nofollow" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="sexy-mail">
			<a href="mailto:?subject=%22Release%2FUnrelease%20SmartScripts%20in%20batch%22&amp;body=I%20thought%20this%20article%20might%20interest%20you.%0A%0A%22In%20the%20most%20recent%20release%20on%20the%20project%20I%27m%20currently%20working%20on%2C%20the%20customer%20wanted%20to%20work%20with%20SmartScripts.%20Very%20soon%20we%20had%20over%2040%20SmartScripts.%0D%0A%0D%0AThe%20problem%20with%20SmartScripts%20however%20is%20that%20they%20all%20need%20to%20be%20released%20whenever%20they%20are%20created.%20And%20since%20the%20customer%20is%20working%20with%203%20%22%0A%0AYou%20can%20read%20the%20full%20article%20here%3A%20http://siebelconsultant.net/releaseunrelease-smartscripts-in-batch/" rel="nofollow" title="Email this to a friend?">Email this to a friend?</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->

]]></content:encoded>
			<wfw:commentRss>http://siebelconsultant.net/releaseunrelease-smartscripts-in-batch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RaiseError()</title>
		<link>http://siebelconsultant.net/raiseerror/</link>
		<comments>http://siebelconsultant.net/raiseerror/#comments</comments>
		<pubDate>Thu, 02 Oct 2008 04:17:31 +0000</pubDate>
		<dc:creator>Wim</dc:creator>
				<category><![CDATA[Configuration]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[eScript]]></category>
		<category><![CDATA[error handling]]></category>
		<category><![CDATA[error message]]></category>
		<category><![CDATA[multi lingual]]></category>
		<category><![CDATA[scripting]]></category>

		<guid isPermaLink="false">http://siebelconsultant.net/?p=52</guid>
		<description><![CDATA[A while ago I discovered the function RaiseError() in Siebel. To be honest, a colleague said that I could use that function in stead of RaiseErrorText().
Since we are implementing a multi-lingual application, all error messages should be multi-lingual. So whenever we wanted to throw an error message in eScript, we used the following code combining [...]]]></description>
			<content:encoded><![CDATA[<p>A while ago I discovered the function RaiseError() in Siebel. To be honest, a colleague said that I could use that function in stead of RaiseErrorText().</p>
<p>Since we are implementing a multi-lingual application, all error messages should be multi-lingual. So whenever we wanted to throw an error message in eScript, we used the following code combining RaiseErrorText and LookupMessage in order to throw the error in the correct language.</p>
<blockquote>
<p style="text-align: left;">TheApplication().RaiseErrorText(TheApplication().LookupMessage(&#8220;User Defined Errors&#8221;, &#8220;X_DISPATCH_REQUIRED_FIELDS&#8221;));</p>
</blockquote>
<p>As you can see, this requires a lot of typing and this was also the opinion of a colleague. He then suggested me to use the RaiseError function instead. This is actually the same, but you just have to pass the name of the error you want to throw as an argument.</p>
<blockquote><p>TheApplication().RaiseError(&#8220;X_BARCODE_NOT_NUMERIC&#8221;);</p></blockquote>
<p>Off course you have to create the error message first in Tools in Message Category -&gt; User Defined Errors and not in User Defined Strings as I tried.</p>
<p>The RaiseError function saves you time on typing code, so be sure to use it next time you want to throw an error in you script when running a multi lingual application.</p>


<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand">
<ul class="socials">
		<li class="sexy-delicious">
			<a href="http://del.icio.us/post?url=http://siebelconsultant.net/raiseerror/&amp;title=RaiseError%28%29" rel="nofollow" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://siebelconsultant.net/raiseerror/&amp;title=RaiseError%28%29" rel="nofollow" title="Digg this!">Digg this!</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://siebelconsultant.net/raiseerror/&amp;t=RaiseError%28%29" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=RaiseError%28%29+-+http://tinyurl.com/nqk8to+" rel="nofollow" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-comfeed">
			<a href="http://siebelconsultant.net/raiseerror/feed" rel="nofollow" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="sexy-google">
			<a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://siebelconsultant.net/raiseerror/&amp;title=RaiseError%28%29" rel="nofollow" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="sexy-mail">
			<a href="mailto:?subject=%22RaiseError%28%29%22&amp;body=I%20thought%20this%20article%20might%20interest%20you.%0A%0A%22A%20while%20ago%20I%20discovered%20the%20function%20RaiseError%28%29%20in%20Siebel.%20To%20be%20honest%2C%20a%20colleague%20said%20that%20I%20could%20use%20that%20function%20in%20stead%20of%20RaiseErrorText%28%29.%0D%0A%0D%0ASince%20we%20are%20implementing%20a%20multi-lingual%20application%2C%20all%20error%20messages%20should%20be%20multi-lingual.%20So%20whenever%20we%20wanted%20to%20throw%20an%20error%20mess%22%0A%0AYou%20can%20read%20the%20full%20article%20here%3A%20http://siebelconsultant.net/raiseerror/" rel="nofollow" title="Email this to a friend?">Email this to a friend?</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->

]]></content:encoded>
			<wfw:commentRss>http://siebelconsultant.net/raiseerror/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Disable Print Preview menu item</title>
		<link>http://siebelconsultant.net/disable-print-preview-menu-item/</link>
		<comments>http://siebelconsultant.net/disable-print-preview-menu-item/#comments</comments>
		<pubDate>Wed, 25 Apr 2007 14:36:31 +0000</pubDate>
		<dc:creator>Wim</dc:creator>
				<category><![CDATA[eScript]]></category>

		<guid isPermaLink="false">http://siebelconsultant.net/disable-print-preview-menu-item/</guid>
		<description><![CDATA[We received the requirement to disable the Print Preview functionality in the entire application.
After searching a while, my colleague asked for help because he didn&#8217;t found anything on Supportweb about this and all his tries to disable it failed. Inactivating the Menu Item &#8216;File &#8211; Print Preview&#8217; didn&#8217;t result in greying out the option from [...]]]></description>
			<content:encoded><![CDATA[<p>We received the requirement to disable the Print Preview functionality in the entire application.</p>
<p>After searching a while, my colleague asked for help because he didn&#8217;t found anything on Supportweb about this and all his tries to disable it failed. Inactivating the Menu Item &#8216;File &#8211; Print Preview&#8217; didn&#8217;t result in greying out the option from the menu. Even after deleting the cache of Internet Explorer, we could still do a Print Preview.</p>
<p>Searching Supportweb with the query &#8220;disable print preview&#8221; didn&#8217;t help us at all. Not a single SR was created with this problem. In the end I searched for &#8220;print preview&#8221; and finally I stumbled upon a piece of code that works. The code is actually very simple and is used on the PrintListService Business Service.</p>
<p>If you want to disable the Print Preview, use the following code in Server Script (eScript)</p>
<blockquote><p>function Service_PreCanInvokeMethod (MethodName, &amp;CanInvoke)<br />
{<br />
if(MethodName == &#8220;QuickPrintPreviewCustomAppletMenu&#8221;){<br />
return(CancelOperation);<br />
}<br />
return (ContinueOperation);<br />
}</p></blockquote>
<p>This will disable the functionality in the entire application. It does not remove the menu item from the menu but just disables it (it becomes greyed out).</p>


<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand">
<ul class="socials">
		<li class="sexy-delicious">
			<a href="http://del.icio.us/post?url=http://siebelconsultant.net/disable-print-preview-menu-item/&amp;title=Disable+Print+Preview+menu+item" rel="nofollow" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://siebelconsultant.net/disable-print-preview-menu-item/&amp;title=Disable+Print+Preview+menu+item" rel="nofollow" title="Digg this!">Digg this!</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://siebelconsultant.net/disable-print-preview-menu-item/&amp;t=Disable+Print+Preview+menu+item" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=Disable+Print+Preview+menu+item+-+http://tinyurl.com/negfp5+" rel="nofollow" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-comfeed">
			<a href="http://siebelconsultant.net/disable-print-preview-menu-item/feed" rel="nofollow" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="sexy-google">
			<a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://siebelconsultant.net/disable-print-preview-menu-item/&amp;title=Disable+Print+Preview+menu+item" rel="nofollow" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="sexy-mail">
			<a href="mailto:?subject=%22Disable%20Print%20Preview%20menu%20item%22&amp;body=I%20thought%20this%20article%20might%20interest%20you.%0A%0A%22We%20received%20the%20requirement%20to%20disable%20the%20Print%20Preview%20functionality%20in%20the%20entire%20application.%0D%0A%0D%0AAfter%20searching%20a%20while%2C%20my%20colleague%20asked%20for%20help%20because%20he%20didn%27t%20found%20anything%20on%20Supportweb%20about%20this%20and%20all%20his%20tries%20to%20disable%20it%20failed.%20Inactivating%20the%20Menu%20Item%20%27File%20-%20Print%20Preview%22%0A%0AYou%20can%20read%20the%20full%20article%20here%3A%20http://siebelconsultant.net/disable-print-preview-menu-item/" rel="nofollow" title="Email this to a friend?">Email this to a friend?</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->

]]></content:encoded>
			<wfw:commentRss>http://siebelconsultant.net/disable-print-preview-menu-item/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Removing trailing spaces in eScript</title>
		<link>http://siebelconsultant.net/removing-trailing-spaces-in-escript/</link>
		<comments>http://siebelconsultant.net/removing-trailing-spaces-in-escript/#comments</comments>
		<pubDate>Mon, 26 Feb 2007 06:04:41 +0000</pubDate>
		<dc:creator>Wim</dc:creator>
				<category><![CDATA[Siebel behaviour]]></category>
		<category><![CDATA[eScript]]></category>

		<guid isPermaLink="false">http://siebelconsultant.net/removing-trailing-spaces-in-escript/</guid>
		<description><![CDATA[At the moment in Siebel, there is no trim function in eScript available to remove leading spacing in a string. In Vbscript, this function is available but not in eScript. A change request has been created to add this function to eScript.
After searching in supportweb, i came acros a piece of code provided by Siebel [...]]]></description>
			<content:encoded><![CDATA[<p>At the moment in Siebel, there is no trim function in eScript available to remove leading spacing in a string. In Vbscript, this function is available but not in eScript. A change request has been created to add this function to eScript.<br />
After searching in supportweb, i came acros a piece of code provided by Siebel to replace the Ltrim() function. The code looked like this:</p>
<blockquote><p>function trim(source)<br />
{<br />
var beginOfString = 0;<br />
var endOfString = 0;</p>
<p>for(var index = 0; index < source.length; index++)<br />
{<br />
if(source.charAt(index) != " ")<br />
if(beginOfString == 0)<br />
beginOfString = index;<br />
else<br />
endOfString = index;<br />
}</p>
<p>return(source.substring(beginOfString, endOfString + 1));<br />
}</p></blockquote>
<p>At first, it looked like the code did what it had to do, remove trailing spaces. But then I noticed that when there are no leading spaces, the code also removes the first letter in the string. Since this is unacceptable, I tried to wrote my own code and it turned out to be very simple.</p>
<p>My code looks like this:</p>
<blockquote><p>function trim(source)<br />
{<br />
while(source.charAt(0) == &#8221; &#8220;)<br />
{<br />
source = source.substring(1);<br />
}<br />
return(source);<br />
}</p></blockquote>
<p>Just a few lines of code but it does the work without removing letters if they are not spaces. Feel free to use the code whenever you need it.</p>


<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand">
<ul class="socials">
		<li class="sexy-delicious">
			<a href="http://del.icio.us/post?url=http://siebelconsultant.net/removing-trailing-spaces-in-escript/&amp;title=Removing+trailing+spaces+in+eScript" rel="nofollow" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://siebelconsultant.net/removing-trailing-spaces-in-escript/&amp;title=Removing+trailing+spaces+in+eScript" rel="nofollow" title="Digg this!">Digg this!</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://siebelconsultant.net/removing-trailing-spaces-in-escript/&amp;t=Removing+trailing+spaces+in+eScript" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=Removing+trailing+spaces+in+eScript+-+http://tinyurl.com/mcns67+" rel="nofollow" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-comfeed">
			<a href="http://siebelconsultant.net/removing-trailing-spaces-in-escript/feed" rel="nofollow" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="sexy-google">
			<a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://siebelconsultant.net/removing-trailing-spaces-in-escript/&amp;title=Removing+trailing+spaces+in+eScript" rel="nofollow" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="sexy-mail">
			<a href="mailto:?subject=%22Removing%20trailing%20spaces%20in%20eScript%22&amp;body=I%20thought%20this%20article%20might%20interest%20you.%0A%0A%22At%20the%20moment%20in%20Siebel%2C%20there%20is%20no%20trim%20function%20in%20eScript%20available%20to%20remove%20leading%20spacing%20in%20a%20string.%20In%20Vbscript%2C%20this%20function%20is%20available%20but%20not%20in%20eScript.%20A%20change%20request%20has%20been%20created%20to%20add%20this%20function%20to%20eScript.%0AAfter%20searching%20in%20supportweb%2C%20i%20came%20acros%20a%20piece%20of%20code%20pr%22%0A%0AYou%20can%20read%20the%20full%20article%20here%3A%20http://siebelconsultant.net/removing-trailing-spaces-in-escript/" rel="nofollow" title="Email this to a friend?">Email this to a friend?</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->

]]></content:encoded>
			<wfw:commentRss>http://siebelconsultant.net/removing-trailing-spaces-in-escript/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>
