Adding indices to custom fields thru the vardefs

sugarcrmdevelopers —  September 28, 2012 — 1 Comment

One question I’ve seen come up time and time again is how to add indices to custom fields. While yes, you could just manually add them on the database itself, it makes it much more difficult for application portability to not have them a part of the Sugar code itself. Because of how vardefs for custom fields are handled, there isn’t much of a natural place to add this.

Fortunately, community member and CTO at Sugar Gold Partner NEPO Systems Jeff Bickart stepped in with a great solution, provided below. Big thanks to him for this!

One response to Adding indices to custom fields thru the vardefs

  1. 

    how can I define a unique constraint at db level via vardefs definitions??

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s