<?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>blog.joaomorais.com &#187; SugarCRM</title>
	<atom:link href="http://blog.joaomorais.com/tag/sugarcrm/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.joaomorais.com</link>
	<description>Blog about software development, personal projects and development tools.</description>
	<lastBuildDate>Mon, 10 Apr 2017 02:26:40 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>SugarCon 2014 &#8211; the power of i</title>
		<link>http://blog.joaomorais.com/sugarcon-2014/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=sugarcon-2014</link>
		<comments>http://blog.joaomorais.com/sugarcon-2014/#comments</comments>
		<pubDate>Wed, 23 Apr 2014 16:00:13 +0000</pubDate>
		<dc:creator>João Morais</dc:creator>
				<category><![CDATA[Events]]></category>
		<category><![CDATA[SugarCRM]]></category>

		<guid isPermaLink="false">http://blog.joaomorais.com/?p=1170</guid>
		<description><![CDATA[For the first time, not only I&#8217;ll be attending as I&#8217;ll also be part of SugarCon &#8211; the biggest event about CRM &#8211; this year uniquely focused on the individual. If you&#8217;re attending as well, feel free to stop by and say hello.]]></description>
				<content:encoded><![CDATA[<p style="text-align: left;">For the first time, not only I&#8217;ll be attending as I&#8217;ll also be part of <a title="SugarCon 2014" href="http://sugarcon.sugarcrm.com/" target="_blank">SugarCon</a> &#8211; the biggest event about CRM &#8211; this year uniquely focused on the <strong>i</strong>ndividual.</p>
<p style="text-align: center;"><a href="http://sugarcon.sugarcrm.com/"><img class=" wp-image-1190 aligncenter" title="SugarCon 2014" alt="SugarCon 2014" src="http://blog.joaomorais.com/wp-content/uploads/2014/04/SugarCon2014-RegistrationBannerImage.jpg" width="750" height="217" /></a></p>
<p style="text-align: left;">If you&#8217;re attending as well, feel free to stop by and say hello.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.joaomorais.com/sugarcon-2014/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SugarCRM: Currencies Exchange Rate Updater</title>
		<link>http://blog.joaomorais.com/sugarcrm-currencies-exchange-rate-updater/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=sugarcrm-currencies-exchange-rate-updater</link>
		<comments>http://blog.joaomorais.com/sugarcrm-currencies-exchange-rate-updater/#comments</comments>
		<pubDate>Tue, 30 Oct 2012 03:18:36 +0000</pubDate>
		<dc:creator>João Morais</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Currencies]]></category>
		<category><![CDATA[Exchange Rates]]></category>
		<category><![CDATA[SugarCRM]]></category>
		<category><![CDATA[SugarCRM 6.x]]></category>

		<guid isPermaLink="false">http://blog.joaomorais.com/?p=1099</guid>
		<description><![CDATA[Not long ago, I wrote a post about the need of a free service that provided a variety of information related to currencies who led me to Open Exchange Rates: Real-time exchange rates for developers! At that time I also mentioned how I had a couple of projects in mind related with the library I wrote then, curiously, one [...]]]></description>
				<content:encoded><![CDATA[<p style="text-align: justify;">Not long ago, I wrote a <a title="Open Exchange Rates: Real-time exchange rates for developers" href="http://blog.joaomorais.com/open-exchange-rates-real-time-exchange-rates-for-developers/" target="_blank">post</a> about the need of a free service that provided a variety of information related to currencies who led me to <a title="Open Exchange Rates: Real-time exchange rates for developers" href="http://openexchangerates.org" target="_blank">Open Exchange Rates: Real-time exchange rates for developers</a>!</p>
<p style="text-align: justify;">At that time I also mentioned how I had a couple of projects in mind related with the library I wrote then, curiously, one of these projects also matched a <a title="SugarOutfitters: Currency automatic updater" href="http://www.sugaroutfitters.com/wanted/view/6" target="_blank">need felt by others</a>: improving/automating the way how exchange rate updates are made in SugarCRM projects.</p>
<p style="text-align: justify;">Two months later, more or less, I&#8217;m back with news regarding these projects: a few minutes ago I&#8217;ve released publicly, and more important, freely, my two first SugarCRM packages.</p>
<p style="text-align: justify;"><span id="more-1099"></span>The first one, is <a href="http://blog.joaomorais.com/wp-content/uploads/2015/03/OpenExchangeRates-0.0.1.zip" target="_blank">Open Exchange Rates library for SugarCRM</a>,  a package built to ease the pain of integrating the <a title="Open Exchange Rates library" href="http://github.com/jcsmorais/open-exchange-rates-lib" target="_blank">Open Exchange Rates library</a>, in SugarCRM projects. The second one, actually depends on the first, is <a href="http://blog.joaomorais.com/wp-content/uploads/2015/03/CurrenciesExchangeRateUpdater-0.0.1.zip" target="_blank">Currencies Exchange Rate Updater</a>, a SugarCRM package designed to ease the process of updating active currencies exchange rates with the help of external data sources.</p>
<p><iframe src="http://www.youtube.com/embed/s9R3dIlWNO4" height="315" width="420" frameborder="0"></iframe></p>
<p style="text-align: justify;">The <a title="SugarCRM: Currencies Exchange Rate Updater" href="http://goo.gl/z8Z5p" target="_blank">video</a> above, illustrates not only the installation process of these packages, but also the two different workflows supported by the latter, who enable an easy management of active currencies exchange rates updates. Either manually by filling latest rates values by hand or by importing these values from an external data source, or automatically, by defining a scheduler job who becomes responsible for performing this updates on a regular basis.</p>
<p style="text-align: justify;">Both packages can be downloaded on SugarForge (<a title="Open Exchange Rates library for SugarCRM" href="http://www.sugarforge.org/projects/oer/" target="_blank">here</a> and <a title="SugarCRM: Currencies Exchange Rate Updater" href="http://www.sugarforge.org/projects/ceru/" target="_blank">here</a>) and on GitHub (<a title="Open Exchange Rates library for SugarCRM" href="http://github.com/jcsmorais/open-exchange-rates-lib-for-sugarcrm" target="_blank">here</a> and <a title="SugarCRM: Currencies Exchange Rate Updater" href="http://github.com/jcsmorais/currencies-exchange-rate-updater" target="_blank">here</a>) respectively.</p>
<p style="text-align: justify;">Keep in mind that both packages are still beta, feel free to get in touch if you find some strange behavior, need any help or if you want to somehow contribute to any of these packages.</p>
<p style="text-align: justify;">To finish, I would like to thank <a title="Joss Crowcroft" href="http://twitter.com/josscrowcroft" target="_blank">Joss Crowcroft</a> for supporting the  <a title="Open Exchange Rates library" href="http://github.com/jcsmorais/open-exchange-rates-lib" target="_blank">Open Exchange Rates library</a> developments by lending me a paid account in order to test paid services and <a title="Filipe Guerra" href="http://twitter.com/alias_mac" target="_blank">Filipe Guerra</a> for his feedback and help on testing both packages.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.joaomorais.com/sugarcrm-currencies-exchange-rate-updater/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to force a view to load other modules languages into SUGAR.language?</title>
		<link>http://blog.joaomorais.com/how-to-force-a-view-to-load-other-modules-languages-into-sugar-language/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-force-a-view-to-load-other-modules-languages-into-sugar-language</link>
		<comments>http://blog.joaomorais.com/how-to-force-a-view-to-load-other-modules-languages-into-sugar-language/#comments</comments>
		<pubDate>Sat, 26 May 2012 18:27:33 +0000</pubDate>
		<dc:creator>João Morais</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Papers]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[SugarCRM]]></category>
		<category><![CDATA[SugarCRM 6.x]]></category>
		<category><![CDATA[Views]]></category>

		<guid isPermaLink="false">http://blog.joaomorais.com/?p=1030</guid>
		<description><![CDATA[As you should know each SugarCRM view extends SugarView class which has a nifty method called _displayJavascript()  who is responsible for including all needed JavaScript files. When it comes to labels, by default, this function only loads current module labels into SUGAR.language. These labels are acessible through the following command: SUGAR.language.get('&#60;ModuleName&#62;', 'LBL_&#60;LabelName&#62;'); In order to add [...]]]></description>
				<content:encoded><![CDATA[<p><img class="alignright  wp-image-1026" title="SugarCRM" alt="SugarCRM" src="http://blog.joaomorais.com/wp-content/uploads/2012/05/sugarCRM-logo.jpg" width="229" height="110" />As you should know each <a title="SugarCRM" href="http://www.sugarcrm.com/" target="_blank">SugarCRM</a> view extends SugarView class which has a nifty method called _displayJavascript()  who is responsible for including all needed JavaScript files.</p>
<p>When it comes to labels, by default, this function only loads current module labels into SUGAR.language.</p>
<p><span id="more-1030"></span>These labels are acessible through the following command:</p>
<pre class="brush:js">SUGAR.language.get('&lt;ModuleName&gt;', 'LBL_&lt;LabelName&gt;');</pre>
<p>In order to add support to other module labels to be included, you should override _displayJavascript() method in your modules view, and specify which other modules labels should be included.</p>
<pre class="brush:php">// modules/&lt;ModuleName&gt;/views/view.edit.php

require_once 'include/MVC/View/views/view.edit.php';

class &lt;ModuleName&gt;ViewEdit extends ViewEdit
{
    protected function _displayJavascript()
    {
        parent::_displayJavascript();

        if (!$this-&gt;_getOption('show_javascript')) {
            return;
        }

        $modules = array(
            '&lt;Module1Name&gt;',
            '&lt;Module2Name&gt;',
        );

        foreach ($modules as $module) {
            if (!is_file($GLOBALS['sugar_config']['cache_dir'] . 'jsLanguage/' . $module . '/' . $GLOBALS['current_language'] . '.js')) {
                require_once 'include/language/jsLanguage.php';
                jsLanguage::createModuleStringsCache($module, $GLOBALS['current_language']);
            }
            echo '&lt;script type="text/javascript" src="' . $GLOBALS['sugar_config']['cache_dir'] . 'jsLanguage/' . $module . '/' . $GLOBALS['current_language'] . '.js?s=' . $GLOBALS['js_version_key'] . '&amp;c=' . $GLOBALS['sugar_config']['js_custom_version'] . '&amp;j=' . $GLOBALS['sugar_config']['js_lang_version'] . '"&gt;&lt;/script&gt;';
        }
    }
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.joaomorais.com/how-to-force-a-view-to-load-other-modules-languages-into-sugar-language/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to reset field values on bean duplication?</title>
		<link>http://blog.joaomorais.com/how-to-reset-field-values-on-bean-duplication/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-reset-field-values-on-bean-duplication</link>
		<comments>http://blog.joaomorais.com/how-to-reset-field-values-on-bean-duplication/#comments</comments>
		<pubDate>Sat, 26 May 2012 17:58:14 +0000</pubDate>
		<dc:creator>João Morais</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Papers]]></category>
		<category><![CDATA[Bean]]></category>
		<category><![CDATA[SugarCRM]]></category>
		<category><![CDATA[SugarCRM 6.x]]></category>
		<category><![CDATA[Views]]></category>

		<guid isPermaLink="false">http://blog.joaomorais.com/?p=1008</guid>
		<description><![CDATA[What you need to do is inject some logic to clear selected field values before the view is displayed. Like all other stuff made in SugarCRM, this process also depends on what type of module you&#8217;re hacking, in other words, the place where you&#8217;re going to write the logic depends if you&#8217;re hacking a custom [...]]]></description>
				<content:encoded><![CDATA[<p><img class="alignright  wp-image-1026" title="SugarCRM" alt="SugarCRM" src="http://blog.joaomorais.com/wp-content/uploads/2012/05/sugarCRM-logo.jpg" width="229" height="110" />What you need to do is inject some logic to clear selected field values before the view is displayed.</p>
<p>Like all other stuff made in <a title="SugarCRM" href="http://www.sugarcrm.com/" target="_blank">SugarCRM</a>, this process also depends on what type of module you&#8217;re hacking, in other words, the place where you&#8217;re going to write the logic depends if you&#8217;re hacking a custom module or a core one.</p>
<p><span id="more-1008"></span>Before you perform view customizations on core modules you should check first if the view is already implemented, in this case, you should check if the following file exists:</p>
<pre class="brush:shell">modules/&lt;ModuleName&gt;/views/view.edit.php</pre>
<p>If so, you should create a new file on:</p>
<pre class="brush:shell">custom/modules/&lt;ModuleName&gt;/views/view.edit.php</pre>
<p>and add further customizations.</p>
<p>Beware that on latest <a title="SugarCRM" href="http://www.sugarcrm.com/" target="_blank">SugarCRM</a> versions, you&#8217;re able to create custom views without having to copy all the logic from the core ones, and by that I mean that now you&#8217;re able to &#8220;truly&#8221; extend the custom views from the latter.</p>
<p>In order to achieve this the view name should be prefixed with &#8216;Custom&#8217;:</p>
<div>
<pre class="brush:php">// custom/modules/&lt;ModuleName&gt;/views/view.edit.php

require_once 'modules/&lt;ModuleName&gt;/views/view.edit.php

class Custom&lt;ModuleName&gt;ViewEdit extends &lt;ModuleName&gt;ViewEdit {
    /** 
     * ...
     */
}</pre>
</div>
<p>If by instance you&#8217;re hacking a core module that doesn&#8217;t have the view defined, you should create it like the example above but with a few differences:</p>
<pre class="brush:php">// custom/modules/&lt;ModuleName&gt;/views/view.edit.php

require_once 'include/MVC/View/views/view.edit.php';

class Custom&lt;ModuleName&gt;ViewEdit extends ViewEdit {
    /** 
     * ...
     */
}</pre>
<p>One thing to keep in mind is that if you&#8217;re hacking a custom module, you are able to choose which directory suits you best. As opposite to the examples above, on the example below, the logic is written directly on the module main folder.</p>
<pre class="brush:php">// modules/&lt;ModuleName&gt;/views/view.edit.php

require_once 'include/MVC/View/views/view.edit.php';

class &lt;ModuleName&gt;ViewEdit extends ViewEdit
{
    public function display()
    {
        $this-&gt;_processDuplicate();
        parent::display();
    }

    /**
     * How bean will act on edit view when it's being duplicated.
     */
    protected function _processDuplicate()
    {
        if ($this-&gt;ev-&gt;isDuplicate) {
            $this-&gt;bean-&gt;&lt;FieldName&gt; = '';
        }
    }
}</pre>
<p>Thanks to Jeff Bickart of <a title="Nepo Systems" href="http://www.neposystems.com/" target="_blank">Nepo Systems</a> and Matthew Poer of <a title="Profiling Solutions" href="http://www.profilingsolutions.com" target="_blank">Profiling Solutions</a> for pointing the &#8220;truly&#8221; Custom views feature out.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.joaomorais.com/how-to-reset-field-values-on-bean-duplication/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>SugarCRM Code Sprint: München 2011</title>
		<link>http://blog.joaomorais.com/sugarcrm-code-sprint-munchen-2011/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=sugarcrm-code-sprint-munchen-2011</link>
		<comments>http://blog.joaomorais.com/sugarcrm-code-sprint-munchen-2011/#comments</comments>
		<pubDate>Sat, 01 Oct 2011 00:00:57 +0000</pubDate>
		<dc:creator>João Morais</dc:creator>
				<category><![CDATA[Events]]></category>
		<category><![CDATA[Code Sprint]]></category>
		<category><![CDATA[DRI]]></category>
		<category><![CDATA[München]]></category>
		<category><![CDATA[Munich]]></category>
		<category><![CDATA[SugarCRM]]></category>

		<guid isPermaLink="false">http://blog.joaomorais.com/?p=892</guid>
		<description><![CDATA[Thanks to DRI, this year I&#8217;m attending the event!]]></description>
				<content:encoded><![CDATA[<p>Thanks to <a title="DRI: Open Solutions for Open Minds" href="http://www.dri-global.com" target="_blank">DRI</a>, this year I&#8217;m attending the event!<a href="http://www.amiando.com/codesprint.html"><img class="aligncenter  wp-image-893" title="SugarCRM Code Sprint: München 2011" src="http://blog.joaomorais.com/wp-content/uploads/2012/02/sugarcrm-codesprint-munich.png" alt="" width="950" height="400" /></a></p>
<p style="text-align: center;">
]]></content:encoded>
			<wfw:commentRss>http://blog.joaomorais.com/sugarcrm-code-sprint-munchen-2011/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to use NTLM authentication with NuSOAP?</title>
		<link>http://blog.joaomorais.com/how-to-use-ntlm-authentication-with-nusoap/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-use-ntlm-authentication-with-nusoap</link>
		<comments>http://blog.joaomorais.com/how-to-use-ntlm-authentication-with-nusoap/#comments</comments>
		<pubDate>Mon, 21 Dec 2009 23:46:22 +0000</pubDate>
		<dc:creator>João Morais</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Papers]]></category>
		<category><![CDATA[Authentication]]></category>
		<category><![CDATA[cURL]]></category>
		<category><![CDATA[NTLM]]></category>
		<category><![CDATA[NuSOAP]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[SOAP]]></category>
		<category><![CDATA[SugarCRM]]></category>
		<category><![CDATA[Webservices]]></category>

		<guid isPermaLink="false">http://blog.joaomorais.com/?p=573</guid>
		<description><![CDATA[For a couple of weeks I&#8217;ve been implementing Webservices to feed resources on a SugarCRM project that I&#8217;m working on. As you may know SugarCRM provides NuSOAP, which is a SOAP Toolkit for PHP that brings some extra functionalities to SOAP implementation provided by PHP. Today I had to use NTLM authentication method, unfortunately it [...]]]></description>
				<content:encoded><![CDATA[<p>For a couple of weeks I&#8217;ve been implementing <a title="Webservices on Wikipedia" href="http://en.wikipedia.org/wiki/Webservices">Webservices</a> to feed resources on a <a title="SugarCRM - Commercial Open Source CRM" href="http://www.sugarcrm.com">SugarCRM</a> project that I&#8217;m working on. As you may know <a title="SugarCRM - Commercial Open Source CRM" href="http://www.sugarcrm.com/">SugarCRM</a> provides <a title="NuSOAP - SOAP Toolkit for PHP" href="http://sourceforge.net/projects/nusoap/">NuSOAP</a>, which is a <a title="SOAP on Wikipedia" href="http://en.wikipedia.org/wiki/SOAP">SOAP</a> Toolkit for PHP that brings some extra functionalities to <a title="PHP Soap Implementation" href="http://www.php.net/soap">SOAP implementation</a> provided by PHP.</p>
<p>Today I had to use NTLM authentication method, unfortunately it isn&#8217;t supported by <a title="NuSOAP - SOAP Toolkit for PHP" href="http://sourceforge.net/projects/nusoap/">NuSOAP</a> yet, but I&#8217;ve found that if you combine <a title="Client URL Request Library" href="http://www.php.net/curl">cURL</a> with <a title="NuSOAP - SOAP Toolkit for PHP" href="http://sourceforge.net/projects/nusoap/">NuSOAP</a> you can get through without a problem.</p>
<p><span id="more-573"></span>So here is the solution I came up with:</p>
<p>First of all I&#8217;ve upgraded <a title="NuSOAP - SOAP Toolkit for PHP" href="http://sourceforge.net/projects/nusoap/">NuSOAP</a> to it&#8217;s latest version which is 0.7.3 (the one provided by <a title="SugarCRM - Commercial Open Source CRM" href="http://www.sugarcrm.com/">SugarCRM</a> didn&#8217;t supported <a title="Client URL Request Library" href="http://www.php.net/curl">cURL</a> yet), then I wrote something similar to the code below.</p>
<pre class="brush:php">&lt;?php

$wsdl = 'http://project/file.php?wsdl';

$client = new nusoap_client($wsdl, true);
$client-&gt;setCredentials('', '', 'ntlm');
$client-&gt;setUseCurl(true);
$client-&gt;useHTTPPersistentConnection();
$client-&gt;setCurlOption(CURLOPT_USERPWD, 'auth_username:auth_password');

?&gt;</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.joaomorais.com/how-to-use-ntlm-authentication-with-nusoap/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
