Skip navigation
All Places > Developer > Blog
1 2 3 Previous Next

Developer

194 posts

We intend to disable support for TLS v1.1 and older in the SugarCloud. This action is consistent with the rest of the industry. It may impact some Sugar integrations that connect to the SugarCloud. If you are hosting Sugar on-site, you should consider taking similar steps to disable TLS v1.1 and earlier on your web servers.

 

Read on to learn more.

TLS/SSL Vulnerabilities

The SSL (“Secure Sockets Layer”) protocol was initially invented by Netscape back in the mid-1990s as a method for securing communications over a computer network. This protocol provides the “S” in HTTPS which is used to secure all HTTP traffic to Sugar web servers. As you might expect with 25 year old security technology, there’s been quite a few revisions and improvements to the original concept over time. In fact, SSL v3.0 came out in 1996 which was only a couple years after SSL itself was first invented. SSL was later succeeded by TLS (“Transport Layer Security”) which itself has seen several iterations.

 

Protocol

Published

Status

SSL 1.0

Unpublished

Unpublished

SSL 2.0

1995

Deprecated in 2011 (RFC 6176)

SSL 3.0

1996

Deprecated in 2015 (RFC 7568)

TLS 1.0

1999

Deprecation planned in 2020

TLS 1.1

2006

Deprecation planned in 2020

TLS 1.2

2008

TLS 1.3

2018

Courtesy of Wikipedia

 

With most technology, the penalty for not adopting the latest and greatest is mostly FOMO (“fear of missing out”). But cryptographic protocols are used for target practice by white and black hat wearing security researchers the world over. This means that using out of date cryptographic protocol compounds FOMO with FOLE (“fear of losing everything”).

 

The value of a TLS/SSL protocol is inversely proportional to the number of holes that have been punched into it. Some of these holes are exploits that go by the name of POODLE and BEAST. At the same time, the industry has been continuously adding better and stronger encryption protocols in response.

 

The industry is dropping support of old TLS versions

SSL is REALLY old, so hopefully nobody is still using this. However, there is still plenty of code out there using older versions of TLS. The PCI Data Security Standard requires all connections to use TLS v1.1 or higher while strongly recommending TLS v1.2 or higher. Even the browser vendors who are loathe to drop features that could impact website compatibility (and market share) have agreed to drop support for TLS v1.0 and v1.1 in 2020.

 

As a result, we are considering the right time to disable support for TLS v1.1 and older for connections to the SugarCloud. This may impact some Sugar integrations that connect to the SugarCloud as we look to stay in step with the rest of the industry.

 

Make sure your REST API integrations are using TLS v1.2+

If you are using a modern web browser, then it is unlikely that you will run into any problems connecting to Sugar instances. However, some REST API integrations that are using old client libraries or runtimes are liable to use these older protocols. Basically, if you are running 10+ year old software in your integration then you will likely have some of these problems below.

 

In particular, please take extra care if you are using any of the following technology with your Sugar integration.

 

Client

Preferred Runtime

Apache HttpComponents

Use latest Java 8 or greater

RestSharp

Use latest .NET 4.7 or greater

cURL and OpenSSL (PHP)

Use OpenSSL 1.0.x or greater (PHP 7.1 or greater)

 

If you aren’t sure, you can use a network analyzer to verify the version of TLS that is in use. For example, you can use tcpdump or Wireshark.

 

Take the following steps if you believe your integration is affected.

  • If applicable, upgrade to newer runtime environments for your integrations
    • Ex. Upgrade to Java 8 or newer or to .NET 4.6 or newer
  • Upgrade to latest HTTP client library versions
    • Ex. HttpComponents v4.4.11+ is compatible with TLS v1.3 implementation found in Java 11
  • Configure your HTTP clients to require use of TLS v1.2

How to disable TLS v1.1 and earlier for Sugar on-site installations

You will typically configure the web server with the versions of TLS/SSL that will be allowed by your Sugar instance.

 

For Apache, the allowed versions of TLS can be configured using mod_ssl’s SSLProtocol directive

 

For IIS, the allowed versions of TLS can be configured using TLS Registry Settings.

 

Connections using TLS v1.1 or earlier will break

Only 6% of web traffic in SugarCloud is using an out of date version of TLS. So we are moving aggressively to ensure SugarCloud will only support TLS v1.2+ in the future. 

 

We will provide more updates as we build a timeline for making this change.

Hello Sugar Developers!

 

We often get questions about building code customizations for SugarCloud. Even experienced developers who have developed customizations for on-site Sugar installations do not know what is possible in SugarCloud. In short, Sugar Cloud does support custom code though there are some rules that need to be followed. We will dig into how write code customizations for SugarCloud in this webinar.

 

What we will be covering:

We will demonstrate by example (with the help of Professor M) the following topics:

  • Accessing SugarCloud Developer Builds
  • How to configure local dev environment to be similar to SugarCloud
  • Methods for managing and deploying custom code in SugarCloud
  • How to debug problems in a Cloud instance
  • Important rules to keep in mind

 

Webinar Information:

Join us for the live webinar:

Tuesday, July 16th 7:00 - 8:00 AM PT

Register Now!

 

Can’t make it? Don’t worry! We will be posting the webinar recording to this community for those who are unable to attend the live session.

SugarCRM strives to be the "No-Touch" CRMOne of the most important steps in making this vision a reality is to integrate Sugar with systems that customers uses to engage with organizations. For example, if a customer has been recently complaining about your product on your blog, wouldn't you want to know about that before talking with them?

 

Building a Wordpress integration

 

This post will explain how to import a comment from your blog (using Wordpress for this example) into Sugar as a note record related to the lead or contact who posted it. The goal of this exercise was to illustrate how to communicate from a common external content management system and Sugar. It turns out that getting the data into Sugar using REST APIs is pretty simple. It was everything else that took some thought and time.

 

The project started out as "send a Wordpress comment to Sugar as a note." It turned into much more than that (and has the potential to go so much further). So, here's a high level of our steps:

 

  • Created a Wordpress plugin
    • Plugin will record the Sugar login credentials and instance path
    • Plugin will call the Sugar OAuth REST endpoint to validate the user's credentials before allowing a save 
  • Upon submitting a comment to any Wordpress blog post, the comment data is sent to our instance of Sugar as a Note
    • Get the current logged-in Wordpress user
    • Authenticate to the Sugar API
    • Check if Wordpress user is in Sugar already (by e-mail address)
      • If so, add this comment as a Note linked to their [Account] record
      • If not, create a Lead record then create and link a Note to that record

 

Every CMS has its own special methods for connecting to external APIs. I chose to not use those functions in Wordpress for this exercise and simply used PHP's cURL functions. This should allow our example to be reused more easily with other applications.

 

The first step was to create the Wordpress plugin with a Settings page to allow a Wordpress admin to configure the integration. Our Settings page asks for Sugar user credentials, the URL to your instance of Sugar, and which version of the API your instance is using. All of this information gets stored in the Wordpress database for easy retrieval by our plugin.

 

The Wordpress settings page for our custom plugin

 

Now that we have our credentials, we will do something with them. We will create some functions that kick off when a Wordpress user adds a comment on any blog post. Wordpress has an action called "comment_post" that gets triggered after a comment is added by a user and subsequently stored in Wordpress database. We can assign a custom function to fire when that event is triggered by writing:

add_action( 'comment_post', 'send_comment_to_sugar_function', 10, 2 );

 

Basically, this line says any time a comment is saved to the Wordpress database, call the function called 'send_comment_to_sugar_function' with a priority of 10 and 2 possible parameters. For more information on Wordpress actions and hooks, check out the Wordpress Codex.

 

Now, let's write the guts for that custom function. The first thing we must do is authenticate to Sugar API. To do that, we will build the URL to the REST endpoint by concatenating the values that we stored in the plugin's settings page. This looks something like:

$api_path_auth = "/oauth2/token";
$auth_url = get_option('sugarcrm_input_url') . '/rest/v' . get_option("sugarcrm_input_api_version") . $api_path_auth;

 

On the settings page, I saved the values in the DB as "sugarcrm_input_url", "sugarcrm_input_api_version", "sugarcrm_input_username", and "sugarcrm_input_password". So, we can access those values with get_option(OPTION_NAME).

 

The oauth2/token endpoint needs parameters to return a successful authentication. Here is what we are sending:

$oauth2_token_arguments = array(
        'grant_type' => 'password',
        'client_id' => 'sugar',
        'client_secret' => '',
        'username' => get_option( 'sugarcrm_input_username' ),
        'password' => get_option( 'sugarcrm_input_password' ),
        'platform' => 'wordpress_api'
);

 

Note the "platform" parameter. This is the name you are giving to your Wordpress instance. You must go into Sugar's Admin settings to allow this platform to communicate with the Sugar REST API. The name could be anything that you like - as long as you add that same name to the Sugar API Platforms list.

Configure API Platforms page in the Sugar Admin

Now that we have our parameters to send, we need to set the cURL options. For a more detailed explanation of cURL in PHP, check out the PHP cURL manual

 

These are our options (pretty typical):

$auth_request = curl_init($auth_url);
curl_setopt($auth_request, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2_0);
curl_setopt($auth_request, CURLOPT_SSL_VERIFYPEER, 1);
curl_setopt($auth_request, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($auth_request, CURLOPT_FOLLOWLOCATION, 0);
curl_setopt($auth_request, CURLOPT_HTTPHEADER, array(
    "Content-Type: application/json"
));

//convert arguments to json
$json_arguments = json_encode($oauth2_token_arguments);
curl_setopt($auth_request, CURLOPT_POSTFIELDS, $json_arguments);

 

That last line is where we are ensuring that we are POSTing to the endpoint and that we are sending a JSON encoded array of parameters.

 

Finally, we can execute the request and parse out the data that we need from the response:

$oauth2_token_response = curl_exec($auth_request);
$oauth2_token_response_obj = json_decode($oauth2_token_response);
$sugar_oauth_token = $oauth2_token_response_obj->access_token;

 

I originally had the function return the auth_token but I decided to also store the auth_token and the refresh_token values in the Wordpress cache so that I can grab them whenever I need them. This will ensures we aren't needlessly logging into Sugar over and over again.

wp_cache_set('sugar_oauth_token_access', $sugar_oauth_token);
wp_cache_set('sugar_oauth_token_refresh', $oauth2_token_response_obj->refresh_token);

 

Now that we have authenticated, we can start sending data through the Sugar REST API. Let's see if the current wordpress user is in our instance of Sugar by utilizing the global search API (/search). Since we are making a GET request, we will format our URL to include our parameters in the URL query string. I used the http_build_query function to loop through an array of parameters and construct a query string to be appended to the end of our endpoint URL. This could have been done manually.

 

Either way works as long as the final result resembles:

http://localhost:8080/sugar/rest/v11_3/search?q=mshaheen@sugarcrm.com&module_list=Contacts,Leads

With the URL setup, we need to use cURL again. Since the settings are essentially the same for each of my requests, I wrote a single function to initialize and execute our REST calls.

function curl_it($sugar_oauth_token, $curl_url, $data = null, $ispost = false) {
     $the_response = null;
     $the_request = curl_init($curl_url);
     curl_setopt($the_request, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2_0);
     curl_setopt($the_request, CURLOPT_SSL_VERIFYPEER,1);
     curl_setopt($the_request, CURLOPT_RETURNTRANSFER, 1);
     curl_setopt($the_request, CURLOPT_FOLLOWLOCATION, 0);
     curl_setopt($the_request, CURLOPT_HTTPHEADER, array(
         "Content-Type: application/json",
         "oauth-token: {$sugar_oauth_token}"
     ));
     if ($ispost) {
          curl_setopt($the_request, CURLOPT_POSTFIELDS, $data);
     }
     $the_response = curl_exec($the_request) ;
     curl_close($the_request);
     return $the_response;
}

 

The notable part of this is where we set the OAuth-Token or a standard bearer token. This wasn't necessary in the initial auth call.

curl_setopt($the_request, CURLOPT_HTTPHEADER, array(
    "Content-Type: application/json",
    "OAuth-Token: {$sugar_oauth_token}"
));

 

Now we should have a response back from Sugar. This response, if successful, will contain a record that has an e-mail address matching the one we sent in. From the returned record, we can grab the IDs that we need to be able to associate this comment with the returned user. We will add the comment as a note linked to the account record. In order to appropriately associate the new note, we'll send the Sugar User ID as the parent_id for the note and ensure that we are using the appropriate parent_type.

 

What if the e-mail address of the current Wordpress commenter can't be found in Sugar? Well then let's add them as a Lead and THEN create the new note and attach it to the newly created lead record.

 

What if the e-mail address is found but it is a Lead and not a Contact? Then we need to set the parent_type to "Leads" and the parent_id to the id of the Lead record. For anything else, we use the account_id from sugar as the parent_id.

 

Now that the plugin is doing essentially what we want it to do, there’s many enhancements we could add. The first one I threw in there was a verify button on the admin form to check if the user settings are valid. I adjusted the auth function to take the form values as parameters. That way, when we expose the function for REST calls we can pass in the values from the form BEFORE they are saved to the Wordpress database.

 

This button is essentially making the same authentication REST call that we are making when sending data to Sugar. I could have written the javascript to call the Sugar endpoint directly but that opens up a few issues. Firstly we would likely (I did) run into a Same-Origin policy conflict where the Sugar client doesn’t recognize and/or trust the external Wordpress domain. The other issue I saw was that I’d have to rewrite exactly what I did in the PHP for the front-end. I prefer reusable code. There were also some security issues to consider but these were the glaring problems from a strictly front-end implementation. SO, I simply researched how to turn my Wordpress functions within the plugin into additional endpoints in the Wordpress API. All it took was registering the route for the endpoint and telling it which function to call.

add_action( 'rest_api_init', 'init_rest_api' );

function init_rest_api () {
     register_rest_route( 'sugarcrm-api/v1', '/auth', array(
          'methods' => \WP_REST_Server::EDITABLE,
          'callback' => 'sugarcrm_rest_auth_validate',
          'args' => ['username', 'password', 'url', 'version']
     ));
}

Other tips & tricks

Much of this exercise was new to me (or I needed some refreshers). What I found was that sending the data to Sugar was not particularly difficult. The work came from deciding what to do with the information and how to handle different scenarios - like the user already being in the system as a Lead not a Contact. I spent a lot of time using the browser console to look at objects returned in the Sugar instance. I think I used this command in the console more than any other:

SUGAR.App.controller.context.get("model")

 

I would navigate to a Lead or Note record in Sugar and then run that command in the developer console to see all of the properties and values for the current module. It really helped me decide on what data to send or grab.

 

But not everything could be traced out on the front-end. So, Stack Overflow came to my rescue with a simple logging function I implemented in the PHP. With this function, I could spit out whatever I wanted to a local log file for debugging. If I wanted to see the contents of a response object, for example, I would write the line:

log_it($my_response, 'The object my_response contains: ');

 

Try it out yourself!

 

If you would like to use the code that was written for this article for some hands-on practice, you will need an instance of Sugar and an instance of Wordpress. I did it all locally with a Vagrant box for Sugar and MAMP for the Wordpress instance.

 

You don't need to install any custom code into Sugar. It uses the standard REST API and a custom API platform which can be configured easily via Sugar Admin panel.

 

The Wordpress integration code has been added to the SugarCRM Building Blocks git repository in the api-examples directory. Simply download and unpack the plugin files and drop them into your Wordpress plugins directory (typically at /wp-content/plugins). Now you should be able to activate the plugin in Wordpress and add your customized settings via the "Sugar API Plugin" settings menu option on the left navigation (like that custom logo icon? hehe).

 

Wordpress admin side navigation hi-lighting "Sugar API Plugin" option

 

Remember to register the platform in Sugar's admin section using the name "wordpress_api" or whatever you change it to in the code. That's it!

 

To try it out, you should be able to add a comment to a Wordpress post and see it attached to a record in Sugar.

 

Now go play! Here are some ideas for changes you can make to my plug-in example.

 

  • Try to add more detail to the Note created in Sugar.
  • When a comment is deleted in Wordpress, find the note in Sugar and update it.
  • Include a link to the record in Sugar that points back to the comment in Wordpress.
  • And please... share with the community what you did - no matter how minor or major.

 

I hope you enjoyed this article. I’ve never really thought of myself as a writer. In fact, my first job was working in an orange juice factory. But I got canned. I couldn’t concentrate.

Hello Sugar Developers!

 

Summer is just heating up and we have a boat load of stuff to share. We want to make sure you are ready for the Sugar Summer '19 release, so we're hosting two webinars just for you!

 

What we will be covering:

Some big changes that are likely to impact you this summer are:

  • Introduction of Sugar User License Types
  • The launch of SugarIdentity
  • Lots of exciting new UI enhancements including Shareable Filters
  • And much more!

 

Webinar Information:

We are holding two sessions to accommodate various geographical locations.On the registration page, you will have the choice of ONE of the following times.

 

Monday, June 24th 4:30 - 5:30 PM PT

OR

Tuesday, June 25th 7:00 - 8:00 AM PT

 

Register Now!


We will be posting the webinar recordings to the Sugar Community for those who are unable to attend the live sessions.


Tell Us About Your Experience:

We'd also appreciate five minutes of your time for a short survey to tell us a bit about yourself and your experience developing on Sugar. The Developer Advocacy team is collecting your input in order to better support you in building world-class solutions that creates customers for life. And if you have further input or questions, you to reach out to us directly at developers@sugarcrm.com.

 

Take the Survey!

Those who have been around a while will know that SugarCRM Inc. was built around a single product called “Sugar”. Sugar is such a part of our DNA today that we often use “Sugar” and “SugarCRM” terms interchangeably. I’m sure that many Sugar Developers out there would be surprised to learn that we sell more than just Sugar at SugarCRM!

 

Sugar has been good to us but the way apps were built in 2004 and how apps are developed today are much different. We’ve been thinking about how we want to build, deploy, and maintain new applications and services today and in the future. This has led us to a long term investment to develop a framework for new cloud-based services that are tightly integrated with Sugar.

 

The tip of the spear is a new set of identity and access management services that we call SugarIdentity. Coming to a Sugar instance near you in June 2019!

 

What is SugarIdentity service?

 

SugarIdentity is a set of user authentication and access management microservices that will improve how we manage Sugar cloud users today. Regardless of the SugarCRM products and services you are using, you will be able to manage your end users in one place. This will make life easier for Sugar administrators while allowing SugarCRM engineers and Sugar Developers to more easily integrate Sugar and other applications and services including those built by partners and ISVs in the future.

 

It will offer improved OAuth 2.0 support, leverages OpenID Connect, and will also address a frequent customer request to support SAML Web Single Sign On (SSO) with the MS Outlook Plug-In.

 

SugarIdentity also supports the concept of Service Accounts which can be used to implement secure Server to Server integrations much easier without involving end user credentials.

 

It also provides a new Cloud Settings user interface that Sugar administrators will use to manage end users and some subtle but important changes to end user login experience.

 

We plan to start on-boarding new Sugar cloud customers in some regions to SugarIdentity service in June 2019.


Frequently Asked Questions

 

We’ve just recently finished up our SugarIdentity Beta where we asked a handful of partners and customers to test drive the new system. We received a lot of valuable input that we used to improve these services. We also received a number of questions from Sugar Developers that we wanted to share below:

 

How do I know if a given Sugar instance is using SugarIdentity?

SugarConfig settings are updated in order to connect a Sugar instance to SugarIdentity services. This will be done automatically for our Sugar cloud customers. SugarIdentity does not currently support Sugar on-premise installations. In practice, you can check the public metadata REST endpoint for any given Sugar cloud instance to see if it is operating in “IDM mode”.

 

GET /rest/v11_4/metadata/public

 

The response will include:

 

{

   …

   “config” : {

      …

      “idmModeEnabled”: true | false

      …

   }

   …

}

 

This setting will be true if SugarIdentity is in use.

 

How to find the Tenant ID for a given Sugar instance?

In most cases, you will not need to know the specific Tenant ID for your Sugar instance in the Sugar cloud. However, it can be useful to know if you need to login to Cloud Settings console directly.

 

 

For example, it can be used with the tenant_hint URL parameter to allow more seamless logins to Cloud Settings.

 

https://login-us-west-2.service.sugarcrm.com/?tenant_hint={TENANT_ID}

 

The Tenant ID can be retrieved from a Sugar instance’s SugarConfig settings or from the public metadata API.

 

GET /rest/v11_4/metadata/public

 

The response will include:

 

{

   …

   “config” : {

      …

      “tenant”: “srn:cloud:iam:us-west-2:{TENANT_ID}:tenant”

      …

   }

   …

}

 

The tenant config property above is an example of a Sugar Resource Name (SRN). SRNs are used to uniquely identify resources across the Sugar cloud ecosystem. You’ll see more SRNs as you adopt the new platform and we roll out more features.

 

How do I deploy a backup of a Sugar cloud instance that uses SugarIdentity?

If you have a backup of a Sugar cloud instance that was configured to use SugarIdentity then it will not likely work without some configuration changes. This is because your local system will not have permission to access the identity services running in the Sugar cloud.

 

Take the following steps to disable SugarIdentity before working with the backup.

 

Update config_override.php to set:

 

<?php

$sugar_config['idm_mode']['enabled'] = false;

 

In a terminal, remove cache/ directory contents:

 

$ rm -rf [path to sugar]/cache/*

 

How does Users module change with SugarIdentity?

User information is now federated across SugarIdentity services and the Sugar instance Users module. When a Sugar instance is connected to SugarIdentity, there will be specific User fields that are no longer owned by the Sugar instance. For example, the user name or e-mail address will be modifiable by a new Cloud Settings user interface and not within Sugar.

 

Updates that are made in Cloud Settings are pushed to Sugar user records automatically via REST APIs and also at the time of each user's login. If you have customizations that write to Users module, these changes could be overwritten by SugarIdentity services.

 

 

At this time, the following Users module fields are owned by SugarIdentity services and should only be updated via new Cloud Settings user interface.

 

  • first_name
  • last_name
  • address_street
  • address_city
  • address_state
  • address_postalcode
  • address_country
  • email_addresses
  • phone_work
  • title
  • department
  • status
  • is_admin
  • preferred_language
  • user_name

 

Custom fields on the Users module are not overwritten.

 

What are changes when authenticating via SugarIdentity?

Ultimately, SugarIdentity will provide more options for authentication and authorization. This will be the area of biggest impact for Sugar integrations.

 

Web Users

When an end user navigates to a Sugar URL and they are not yet logged in they will be redirected to a login service. This login service will have a different URL than their Sugar instance. However, once logged in they will be redirected back to their Sugar instance.

 

REST API integrations

If authenticating using REST API, the endpoint behavior is essentially unchanged. What has changed is the format for OAuth access and refresh tokens. Instead of using UUIDs, SugarIdentity uses encrypted tokens that are base64 encoded. If you are storing access or refresh tokens, they can now be up to 255 characters long. However, there is no hard limit on their size and they may get longer over time.

 

Ex.

"SyeIRxNeMkRy8IBluxttQ8DzrXEt4CQp2vzoWVQFJqw.xaZOVhc8hdB630ZoLBt9LOHePZb6j6uRRKGkKgNe3RI"

 

What functionality or customizations are not supported when using SugarIdentity?

Much of the responsibility for handling authentication is now delegated to SugarIdentity services. This means that many customizations to Sugar’s authentication mechanisms are no longer supported.

 

In particular, if you have created any custom SugarOAuth2Storage* classes then these will not work when SugarIdentity is used. The responsibility for generating and managing authentication tokens is now the responsibility of our Sugar cloud service instead of the Sugar instance.

 

If you feel like an essential authentication feature is missing in SugarIdentity services, then please let us know by filing an enhancement request via the Support Portal.

 

When using SAML Web SSO, should I move my integration users to my external identity provider?

Some customers that have wanted to use SAML with Sugar have held off until the SugarCRM Outlook Plug-In supported it. For Sugar customers using the new SugarIdentity service, the Outlook Plug-In will now support SAML Web SSO for the first time.

 

If you’re using integration users, we recommend leaving them as local user accounts instead of moving them to your SAML identity provider. The same advice applies when using LDAP an external identity provider too. SAML Web SSO isn’t well suited for REST API integrations since it requires credentials to be entered into a browser which makes automated authentication challenging. Your SAML or LDAP identity provider should only be responsible for managing employee access to Sugar.

 

This is also a use case where Service Accounts will come into play. Service Accounts will allow for the separation of responsibility between regular user accounts and services accessing Sugar data for integration purposes. This is a feature we are planning to implement in the future.

Good Morning, Sugar Developers!

 

That's me! Gotta be festive at the holidays!

My name is Michael Shaheen and I am SugarCRM’s new Developer Advocate. I’ll be working with Matt Marum to maintain relationships between our developer community and the teams that work with the Sugar product group.

 

Let’s talk a bit about my background. I have been a developer since writing

10 print “Michael Rocks”
20 goto 10

to fill up the screen at the mall Radio Shack in the early 80s. Since then, I have worked for multiple companies as a manager of software development teams. I may have been managing, but I can never stop coding. I love to get into projects and solve problems. Lately that has been mostly front-end work (Javascript, React, SASS, task runners, etc), but I’m not a stranger to back-end. I spent many years coding in .NET, Java and PHP.

 

At home, I have a beautiful wife and 2 lovely teenage daughters. Oh and cats. We have 2 indoor and a few outdoor cats that we take care of. I also tell a lot of dad jokes (but that started before the kids).

 

Over the past 3 weeks, I have been learning all there is to know about SugarCRM as an organization and Sugar as a platform. I’m looking forward to talking to each of you through the Developer Community and, hopefully, in person as much as possible. From the conversations I’ve had with SugarCRM engineers, I know that they all want to put out the best quality product possible. The Developer Community is one of our top ways of gathering feedback. I aim to ensure your feedback is heard and acted upon. Keep your eyes peeled for a survey!

 

I am very excited to be in this new role and I can’t wait to meet you all through the Developer Community as well as at events as they arise. In the meantime, say hello in the comments or leave me a comment with your best dad joke. I’ll get you started:

 

Remember, 6 out of 7 dwarfs aren’t happy.
Matt Marum

Sugar 9 has arrived!

Posted by Matt Marum Employee Apr 9, 2019

Hey Sugar devs!

 

Spring is in the air (for the northern hemisphere)! This can mean only two things: allergy season has started and a new Sugar On-Site release is now available.

 

Let me introduce to you Sugar 9.0!

 

See below for all the information Sugar Developers need to know. Sugar end users can be directed over to one of the official Sugar release announcements: the Sugar Spring '19 announcement is for cloud customers and the Sugar 9.0 announcement is for on-premise customers.

 

In our recent developer webinar we gave an overview of the important changes coming in the Sugar 9.0 On-Site and Sugar Spring ‘19 cloud releases:

 

 

The slides from that webinar are available here.

 

Did you miss the webinar? Want to make sure you’re the first to know about important Sugar product changes? Make sure you are signed up for Sugar Developer News!

 

Here's a quick overview of what can be expected if upgrading from Winter ‘19

  • Group Outbound Email Support
  • SugarBPM™ improvements
  • Performance and scalability improvements

 

In addition to the above, here are some of the many additional updates you’ll see if upgrading from Sugar 8.0.

  • Reporting improvements including report scheduling
  • Data Privacy improvements including double opt-in
  • New Quotes configuration panel
  • Emoji support on MySQL (utf8mb4 conversion)
  • Updates to JS libraries including upgrading to jQuery 3
  • Added PHP 7.3 support
  • Updated Microsoft stack support for those hosting on Windows
  • More performance and scalability improvements

 

Check out the below resources for the rest of the details.

Impatience is a virtue

Larry Wall (the inventor of Perl) is credited with identifying the three great virtues of a programmer: "laziness, impatience, and hubris."

 

These virtues are usually shared with a wink. For example, a programmer's "laziness" will drive them to get as much work done as possible with the least amount of effort. They say that we'll write automation scripts (in Perl probably) or follow the DRY principle to remove all redundant and unnecessary effort.

 

I find the "impatience" and "hubris" virtues more interesting.

 

The virtue of "impatience" is meant to make us "write programs that don't just react to your needs, but actually anticipate them." It also means that we demand a lot from our software. We want it to be as fast, efficient, and proactive as possible. It can be just as satisfying to double the speed of a program as it was to create "v1.0" in the first place.

 

 

Impatience is a virtue that I think we share with our Sugar users. We all want Sugar to be responsive and, at best, to be able to provide an insight that anticipates every Sugar user's need. That's why we have a dedicated team of Performance Engineers that work cross-functionally with Product, Operations, and Support teams with the goal to make Sugar fast. REAL FAST.

 

The last virtue is "hubris" which means that programmers should take great pride in the code they write and the work they do. So let me exercise a little hubris by bragging about what the Performance team has accomplished over the last year.

 

Performance Testing Apparatus

We've leveraged our experience of running the Sugar cloud to put together an exhaustive  REST API performance test suite of over 15,000 API requests using JMeter. These requests exercise commonly used Sugar functions such as loading List Views, viewing and updating Record Views, performing mass updates, and much more. We combine that by using Tidbit to load the Sugar database with 60GB of data. This data set includes a half million Accounts, two million Contacts, and millions more interaction records.

 

The combination of JMeter test suite and Tidbit data set serves as the basis for testing and comparing different Sugar versions and build to build. The results below were gathered by running this same test suite against multiple Sugar versions - 8.0.1, 8.0.2, 8.3.0, and a pre-release build of Sugar 9.0.0.

 

Remember: If you are a Sugar Customer or Partner and you want to have closer look at our JMeter performance test tools, you can sign up to get access to Sugar Test Tools. Tidbit is an open source project available on our Github organization.

 

3x to 7x faster Filter API performance since July 2018

The Filter API is one of the most commonly used Sugar REST APIs. It is used to load List Views, Dashlets, Subpanels, and is commonly used by integrations that need to synchronize data between Sugar and an external system.

 

This API can introduce some performance challenges because it allows access to many records at once using arbitrary filter criteria and sort order. The performance of this API can vary widely depending on the data set, the database schema, and the options being used. So this API has been a particular area of focus for our performance engineers that having been identifying bottlenecks and eliminating them one by one.

 

As a result, Filter API performance in Sugar 9 has improved by a factor of 3x to 7x as compared to Sugar 8.0.1 which was released less than a year ago in July 2018.

 

 

Average API response time cut by more than half since July 2018

The average Sugar 9.0 response time across the 15,000 requests in our test suite is a fraction of what it was in 8.0.1. It is 40% faster than 8.0.2 and 30% faster than even our Winter '19 release. This means that no matter how you are using or integrating with Sugar, you will see significant responsiveness gains by upgrading to Sugar 9.0 (on-premise) or Spring '19 (cloud) when they come out.

 

ReleaseAverage Response Time
8.0.11.59s
8.0.21.03s
8.3.0903ms
9.0.0 (pre-release)596ms

 

Increased throughput by 70% on same hardware

If you are using Sugar on-premise, there is a substantial increase in request throughput which can translate to lower hosting costs since more users can be hosted on less hardware. Our testing shows that Sugar 9.0 should process 70% more requests in the same amount of time as the latest Sugar 8.0.2 on-premise release using the same hardware. This should help you stretch hosting dollars further.

 

 

Our work is never done

This is a really exciting time to be part of the SugarCRM ecosystem. We are adding many new products and capabilities to the SugarCRM portfolio and our Performance team is here to make sure that all these products meet and exceed our customer's performance expectations.

Hello Sugar Developers!

 

Are you excited about Sugar 9.0.0?

 

We want to make sure your customizations and integrations are ready for the Sugar 9.0 (on-premise) and Spring '19 (cloud) releases, so we’re hosting two webinars just for you!

 

What we will be covering

 

We’ll discuss the big changes that are likely to impact you including the following:

  • Review of changes in Sugar 8.1Sugar 8.2, and Sugar 8.3
  • Updated Sugar on-premise supported platforms (PHP 7.3, SQL Server 2017)
  • Introducing new REST API version 11.5 11.4 endpoints
  • API performance and scalability enhancements

 

Webinar Information

 

We are holding two sessions to accommodate various geographical locations. Please choose ONE of the following times below.

 

Monday, March 25th 4:30 - 5:30 PM PT OR Tuesday, March 26th 7:00 - 8:00 AM PT (Choose one)

 

Register Now

 

As always, we will be posting the webinar recordings to the Sugar Community for those who are unable to attend the live sessions.

Hey Sugar devs!

 

Just like clockwork, it is time for another Sugar cloud quarterly release. If you are on-premise, then you will get these features and many more in the upcoming Sugar 9.0 release in the Spring.

 

Check out the official release announcement for information that your end users will care about.

 

For Developers, we recently hosted a developer webinar we gave an overview of the important changes developers need to know:

 

 

The slides from the webinar are available here.

 

Here's a quick overview of what developers can expect in Winter '19 release.

  • We've added a bunch of new great features like the Comment Log and Product Catalog Quick Picks dashlet
  • We've enhanced the export options available in Reports module
  • We've also made a number of enhancements to Advanced Workflow including the ability to use old and new values in email templates
  • We've put in groundwork for future PHP 7.3 support
  • We've also upgraded to jQuery 3.3.x
  • And our REST API version increased to 11.4 with some additional API endpoints

 

Check out the below resources that have the rest of the details.

 

We hope you’re as excited about this release as we are!

Hello Sugar Devs!

 

My name is Patrick Sullivan and I am SugarCRM’s Escalation Manager. I live in Pennsylvania, USA and began my career at SugarCRM in 2015 as part of the Support team. As the Escalation Manager, my job is to drive resolution of critical customer issues by working across all departments at SugarCRM, especially Technical Support, Technical Account Management, Professional Services, and Product teams. In short, I make sure problems are solved and stuff gets done.

 

Back in the Sugar Fall '17 release (also known as 7.10) we introduced a brand new Emails module built using the Sidecar framework. While the new Emails module introduced a lot of new functionality, we did not include an existing feature related to Outbound Email Accounts, specifically Group Mail Accounts, that some existing Sugar customers relied on.

 

Per our documentation, group inbound email accounts allow multiple users, such as team members, to view emails from an external mail account.  We often see customers configure group inbound mail accounts for support, sales, and similar functions. In Fall ’17 and later versions of Sugar, it is very easy to set up group mail accounts for incoming email and allow many users the ability to access the inbound email.  For outbound email, the outbound email accounts must be configured for each individual user separately, providing for more granular access control.

 

Some of you missed the ease of deploying outbound email account configuration to multiple Sugar users at once. If we are talking about you then have no fear! Enrico Simonetti, Senior Technical Account Manager, has created an open source solution to allow Sugar administrators the ability to deploy outbound email accounts to entire teams with just a few clicks of the mouse. Go Enrico!

 

Accessing the Code

You can find the code for this solution in the Sugar Labs github account at:

 

https://github.com/sugarcrmlabs/OutboundEmailsDeployer

 

All you need to do is download the files, compile it into a module loadable package, and install it to your Sugar instance via Module Loader!

 

Please note that this code is provided as-is under the Apache 2.0 license.

 

Using the Deployer

Once you have installed the code, you will need to clear your browser cache.  After doing so, you will see a new section in your instance’s Admin panel called Outbound Group Email Account Deployer:

 

Opening the deployer will take you to a new page where you have several dropdown lists for selecting the applicable email account, the team to which you want to deploy the email account, and a list of all of your currently-deployed accounts.

 

For more instructions, you can find the deployer’s documentation at:

 

https://github.com/sugarcrmlabs/OutboundEmailsDeployer

 

If you have any questions, feel free to comment on this blog post, but please remember that this solution is being provided as-is.

 

Roadmap

This feature is under consideration to be included as a standard fully supported feature in a future Sugar release. Please leave feedback below if you find this feature useful!

As of this writing, all current Sugar versions (7.9 extended, 8.0, and Sugar cloud) supports and uses PHP 7.1. This PHP version was released in 2016 and entered security support on December 1st 2018. While we’ve made great strides in supporting newer PHP versions over the last few years, we have tended to be a couple years away from the latest and greatest.

 

So what is today’s latest and greatest? Well PHP 7.3 was just released on December 6th 2018. Therefore PHP 7.3 will be the next version that Sugar will support. Over the last few months our engineers have been laying the groundwork for that support in our upcoming Sugar 9.0 release.

 

Some of that work involves adding cumulative code compatibility changes for PHP 7.2 and PHP 7.3. The details of these changes can be found in the PHP 7.2 migration guide and the PHP 7.3 migration guide.

 

However, our intent is to certify support for PHP 7.1 and PHP 7.3 for Sugar 9.0. We have no plan to support PHP 7.2 now or in future. By skipping 7.2, we are able to spend more time innovating while still allowing you all to access the latest and greatest features and performance that new PHP versions offer.

 

Library updates in Sugar Winter ‘19 release

In the upcoming Sugar Winter ‘19 release, the following PHP libraries are updated. Many of these were updated to newer versions that were compatible with PHP 7.3.

 

  • doctrine/dbal: 2.7.1 → 2.8.0 (changelog)
  • ramsey/uuid: 2.9.0 → 3.8.0 (changelog)
  • symfony/{cache,console,framework-bundle,security-core,security-csrf,translation,validator}: 3.4.8 → 3.4.16 (changelog)
  • tedivm/jshrink: 1.1.0 → 1.3.1 (changelog)
  • onelogin/php-saml: v2.11 → v3.0 (changelog)

 

Additionally, we are making minor changes to the following vendored libraries for PHP 7.3 compatibility:

 

  • Smarty
  • XTemplate
  • HTMLPurifier

 

If you have custom code that uses any of the above libraries, you should verify that your customizations are still compatible.

 

Looking ahead to PHP 7.3

Finally, here are some additional PHP resources that you can review today to help you get ready to use PHP 7.3.

 

 

Let us know what you think in the comments below!

Hey Developers!

 

While we loved seeing everybody who came out to SugarCon this year, we know that a lot of you weren't able to make it. The good news is that we recorded all the developer sessions at SugarCon last October. They are all published today in the SugarCon space but we wanted to make sure you didn't miss them.

 

Check out the table below to links to the recordings, slides, and speakers.

 

 

We hope to see you all at future SugarCons and other Sugar Developer events!

Hello Sugar Developers!

 

We want to make sure your customizations and integrations are ready for the Sugar Winter ‘19 release, so we’re hosting two webinars just for you!

 

Webinar Topics

 

We’ll discuss the big changes that are likely to impact you including the following:

 

  • New REST API version: v11_4
  • New Comments Log field type and APIs
  • Enhancements to Reports module
  • Upgraded PHP and JavaScript libraries including jQuery

 

Webinar Schedule

 

We are holding two sessions to accommodate various geographical locations. Please choose ONE of the following times below.

 

Thursday, December 13th 7:00 - 8:00 AM PT

OR

Thursday, December 13th 5:00 - 6:00 PM PT

 

Register Now!

 

As always, we will be posting the webinar recordings to the Developer community  for those who are unable to attend the live sessions.

We are fast approaching the Winter '19 release into the Sugar cloud that is planned for January 2019. Some of the changes coming in this release will be upgrades to the jQuery library and associated plug-ins that are commonly used by user interface customizations to Sugar.

 

jQuery libraries upgraded from v1.12.4 to v3.3.1

 

In the Sugar Winter '19 release, we have made a significant upgrade to the jQuery versions used by Sidecar and SugarMVC (BWC) modules. 

jquery: v1.12.4 -> v3.3.1 (changelog) (Upgrade Guide)
jquery-migrate: v1.4.1 -> v3.0.1 (changelog)

 

jQuery Migrate should help maintain compatibility for custom code using older jQuery APIs. Custom code that uses deprecated jQuery APIs should be updated as soon as possible.

 

As part of the jQuery upgrade, the following jQuery plug-ins needed to be updated to be compatible with v3.3.1.


include/javascript/jquery/markitup: v1.1 -> v1.1.15 (changelog)
include/javascript/pmse/lib/jquery.layout-latest.js: v1.3.0 -> v1.6.3 (changelog)
include/javascript/jquery/jquery.timepicker.js: 1.8.8 -> 1.11.14 (changelog)

 

If you've added jQuery plug-ins to Sugar as part of your customizations, you should make sure they are compatible with jQuery 3.3.1 as well! Check out the jQuery Plugin Registry to make sure the version of the plug-in you are using is compatible with jQuery 3.3.1. If not, you may need to upgrade to a newer version of your plug-in or remove it.

 

 

This plug-in is compatible with jQuery 3.3.1.  SWEET!

 

 

We've also upgraded the Bootstrap JS library from v2.0.0 to v2.2.1 (changelog) and also moved it to a new location.

 

include/javascript/jquery/bootstrap/bootstrap.min.js (v2.0.0) has been removed
include/javascript/twitterbootstrap/bootstrap.min.js (v2.2.1) has been added 

 

If you happen to refer to the old file directly, you'll need to update your links to point to the the new location.

 

Other JavaScript library updates

While jQuery is probably the most impactful JavaScript change in this release, there are other JS libraries that you should know about.

 

Sidecar library updates

We've also made some changes to these other two Sidecar libraries. If you happen to be using them, please check out their change logs to ensure that you're still compatible.

 

sugarcrm/ventana: v1.1.1 -> v1.1.2 (changelog)
moment: v2.11.2 -> v2.22.2 (changelog)

 

Removal of JIT Chart library

The deprecated JIT chart library has been removed in this Sugar release. The JIT chart library was deprecated in Sugar 7.10 and has been replaced by Sucrose charts. Please ensure you have removed any code that uses JIT charts prior to upgrading.

 

Don't miss the Winter '19 Sugar Developer Webinar!

On Thursday, December 13, come join us in one of our live webinars about all the enhancements coming in Winter '19 to the Sugar cloud.