HOWTO: Add duplicate check indexes for non database fields for import

sugarcrmdevelopers —  March 3, 2011 — Leave a comment

I ran across this post in the forums the other day, which addresses a common pain point for people who do imports. The imports module has a nice feature to do duplicate checking on the imported records, which is handy to help sanitize your data as it’s being imported into Sugar.

One shortcoming with how this is done is the choices of duplicate indexes to use are simply the defined indexes in the table. If a field you want to do duplicate checking on is a non-db one ( like email address is ), you are forced to override the ImportDuplicateCheck::_getIndexVardefs() like this:

Fortunately, in the upcoming Sugar 6.2 release we have made this upgrade-safe. You’ll be able to add a non-db index to the vardefs like the following that will be available to the duplicate check index list.

No Comments

Be the first to start the conversation!

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