>=Sugar5

Ideas to Improve Relate Fields in SugarCRM

Introduction

For my ongoing documentation work I've investigated the workings of the Relate field type, both the Vardefs and the SugarField. To see the Wiki pages on this see:

1. Vardefs: http://www.sugarcrm.com/wiki/index.php?title=Relate_(Vardefs_field)
2. SugarField: http://www.sugarcrm.com/wiki/index.php?title=Relate

The Relate field type can be a very powerful way to display fields from other beans, but at this moment it's limited by Sugar. Relate fields are used by one-to-one or one-to-many (on the 'many' side) relationships, and thus hold the contents of one related bean. That way it's possible to display the Account Name in Contacts, for instance.

Why am I being redirected in Sugar?

...I DID modify the handleRedirect() function!

If you're wondering, first look at this: here. There is duplicated functionality in Sugar, the SugarApplication::redirect() function is the one you should use, not handleRedirect(). That one is there for BC.

Custom language files

Translating Sugar and adding custom language strings and/or dropdown arrays can be a bit tricky. Basically, the problem is: When there's an error, you're on your own. This means that fields without a translation, or undefined dropdowns will usually just stay empty. So, we dig in.

Syndicate content