Posts Tagged ‘module builder’

Sugar, Custom Relationships and You

Tuesday, November 11th, 2008

Sugar 5.1 brought many improvements to the Sugar application framework.  In this release, we introduced a new method for creating custom relationships in Studio and Module Builder called the Relationship Editor. This new editor consolidates the functionality of the old “relationship fields” which worked as basic one-to-many relationships as well as the many-to-many relationships that are produced from creating relationships in the 5.0 Module Builder.

As there have been questions regarding how to use this new editor and how exactly it works, this article will cover the inner workings of the Relationship Editor.

(more…)

Module Builder vs Custom Fields

Tuesday, September 2nd, 2008

Something to watch out for when working in Module Builder are reserved database keywords. In Studio, this isn’t a problem as all the custom fields get ‘_c’ appended to their column names in order to easily distinguish them from out-of-the-box fields. In Module Builder however, fields are stored with the exact name entered, so database keywords such as “IN” “AND” “SELECT” are disallowed as a field name.  Module Builder will notify you that a field name is not allowed because it is a database reserved word.  Studio doesn’t need to give that error notification because all fields are automatically appended with the ‘_c’.

Module Builder – What’s new in 5.1

Thursday, August 28th, 2008

One of the best parts of using Sugar has to be customizing it. You don’t want to use a software package if it can’t meet your needs, and no two people or businesses have the same set of requirements. Sugar provides some really neat tools when it comes to customization, and in 5.1 they have been made even better.

There are a lot of really cool additions to the 5.1 developer tool set, and I’d thought I’d take a minute to quickly go over a couple of them.

Once you open up Module Builder in 5.1, you will notice the addition of two new templates, File and Sale. The File template is for document-based modules such as resumes, photos, or any other files you need to work with. Sale is based on the opportunities module and is designed to store information on sales and possible future sales.

After you have created a new module, you may also notice a few more new things. One that I would like to point out is under layouts, we have added Sugar Dashlet views. Starting in 5.1, your new custom modules will have Sugar Dashlets available straight out of Module Builder. You can edit the Sugar Dashlet layouts in the same manner as standard list and search views.

Finally, I’d like to touch on the area of integrations. In previous versions of Sugar, there wasn’t an easy way to integrate with existing web based systems from Studio or Module Builder. Certainly you can find many tutorials on how to add custom logic hooks to do this, but there hasn’t been a way to do integrations writing any code. In 5.1, this has changed with the addition of Link fields and iFrames with auto-generated URLs.
I’ll show how this is used with a fairly simple example, adding a Google map to the DetailView of a company. In this case my new “Partners” module which is based on the company template.

  1. Open up your custom module’s fields, and click “Add Field”.
  2. Select the IFrame field type.
  3. Fill in the following data:
    • FieldName: GoogleMap
    • Display Label: Google Map
    • Generate URL: check
    • Default Value (now this is where the magic happens):
      http://maps.google.com/maps?f=q&q={shipping_address_street}+
      {shipping_address_city}+
      {shipping_address_state}+
      {shipping_address_postalcode}+
      {shipping_address_country}
    • Max Size: 255
    • IFrame Height: 400
  4. Add the new field to your DetailView. Be sure to give the field a full row to itself for maximum readability. Note that adding an iFrame or a Link field that has a generated URL to an EditView will result in a read-only field that is un-editable.
  5. Deploy your package and create a new record in your new module, be sure to enter a real address into the shipping address fields.
  6. Save the record and view the Google map pointing to the business’ location.

The uses for generated URLs are almost endless, as you can embed links and iFrames to either internal or external systems without writing a single line of code. Feel free to post some ideas for other integrations.

Have feedback for us? Drop us a line.
Terms & Conditions | Privacy | Trademark Info | Contact Info | FAQs | SugarCRM Inc.© 2004 - 2009 All rights reserved.