Archives For Sugar 7.9.0

An Advanced Workflow process can only be triggered once per PHP process or HTTP request. This is intended to prevent Sugar Administrators from defining infinitely looping processes. (A real catastrophe!) But what does this mean for PHP customizations?

Assume that you have an Advanced Workflow process enabled for the Contacts module that performs an update on this Contact each time it is saved. If you have an Accounts after_save logic hook that performs an update on each related Contact SugarBean then the process will only run against the first related Contact. Any other related Contact that gets saved during your logic hook execution will not have a process run.

This affects not just logic hooks but any other class of PHP customization such as custom API endpoints or jobs.

Workaround

If you really need to run that process more than once in the same request, here is a workaround:

use Sugarcrm\Sugarcrm\ProcessManager\Registry;
...
Registry\Registry::getInstance()->drop('triggered_starts');

Calling this method will clear the internal Advanced Workflow registry that keeps track of the triggered process starts. After calling this method, the same process can then be triggered again inside the same PHP process or HTTP request.

Careful use of this method can make sure that PHP customizations play nicely with processes defined in Advanced Workflow.

You may have seen that that Sugar 7.9 has now been released! We have moved the Quotes module and Reports list view to Sidecar framework. We’ve also made plenty of platform enhancements such as adding prepared statements support.

pastedImage_3

Quotes in Sidecar!

Quotes Module Developer Guide

We have created an all new Quotes section in the Sugar 7.9 Developer Guide that is designed to address common customizations that Sugar Developers make to the Quotes module.

Sugar 7.9 Migration Guide

The Migration Guide for Sugar 7.9 is an essential resource for any Sugar Developer upgrading a customer from Sugar 7.8.x. The guide will help you identify code and platform changes that you need to make in order to ensure that you can upgrade your code and customers successfully.

Sugar 7.9 Unit Tests

The Sugar Unit Tests repository has been updated with unit tests for Sugar 7.9. This is the same test suite that the product team used in developing Sugar 7.9. Remember that you need to sign up for access to the Sugar test repositories.

Sugar 7.9 Overview for Sugar Developers

We delivered a recorded webinar that will be shortly available in the Developer space in the Sugar Community. This is a great way to get immediate understanding about all the new features and platform changes that were introduced in Sugar 7.9. The presentation slides will also be posted in the Developer community shortly.

What are Prepared Statements?

Prepared Statements, also known as parameterized statements, is a database feature that allows the same or similar queries to be executed with more efficiency and greater security. It has also been a common Sugar platform feature request for some time.

A prepared statement looks something like this:

SELECT * FROM table WHERE id = ?

As you can see, a prepared statement is basically a SQL template that allows you to identify parameters that can be bound later. The database engine can parse, optimize, and cache this statement without executing it.

This reduces the overhead associated with parsing complex queries that are used frequently by applications like Sugar. For example, you can imagine that List View queries would benefit from prepared statements since they are often complex and executed each time a list is displayed, searched, filtered, or paginated. With prepared statements, the database will do less work each time one of these actions is repeated.

Continue Reading…